You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/testing-recipes.md
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -377,7 +377,6 @@ let container = null;
377
377
beforeEach(() => {
378
378
// setup a DOM element as a render target
379
379
container = document.createElement("div");
380
-
// container *must* be attached to document so events work correctly.
381
380
document.body.appendChild(container);
382
381
});
383
382
@@ -416,7 +415,7 @@ it("changes value when clicked", () => {
416
415
});
417
416
```
418
417
419
-
Different DOM events and their properties are described in [MDN](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent). Note that you need to pass `{ bubbles: true }` in each event you create for it to reach the React listener because React automatically delegates events to the document.
418
+
Different DOM events and their properties are described in [MDN](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent). Note that you need to pass `{ bubbles: true }` in each event you create for it to reach the React listener because React automatically delegates events to the root.
0 commit comments