user-event
user-event copied to clipboard
allow keyboard events on shadow root hosts
What: Resolves #1153
Why: The current code only allows keyboard entry on elements with a ShadowRoot if the ShadowRoot has a focusable element
How:
The getActiveElement function previously checked for the existence of a shadowRoot on the currently active element, since active elements in a shadow DOM make the host element the active element in the light DOM, but this logic ignored the fact that host elements can also be active elements on their own.
Checklist:
- [N/A] Documentation
- [x] Tests
- [x] Ready to be merged
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 3f3a23ad0748c639d33974599e5b3593f40a4ae9:
| Sandbox | Source |
|---|---|
| priceless-thompson-vd5dxf | Issue #1153 |
Ran into this same issue today. Can we get a release with it?
Same here, just ran into this issue. Fantastic that it's already solved. Would love a release with it.