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
docs(test-utils): add tip about using trigger('focus') (#1848)
When using `trigger('focus')` with jsdom v16.4.0 and above you must
use `attachTo` when mounting the component.
Co-authored-by: peterhegman <[email protected]>
When using `trigger('focus')` with [jsdom v16.4.0](https://github.com/jsdom/jsdom/releases/tag/16.4.0) and above you must use the [attachTo](../options.md#attachto) option when mounting the component. This is because a bug fix in [jsdom v16.4.0](https://github.com/jsdom/jsdom/releases/tag/16.4.0) changed `el.focus()` to do nothing on elements that are disconnected from the DOM.
43
+
:::
44
+
41
45
-**Setting the event target:**
42
46
43
47
Under the hood, `trigger` creates an `Event` object and dispatches the event on the Wrapper element.
0 commit comments