Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow keyboard events on shadow root hosts #1235

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mattclough1
Copy link

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
  • Tests
  • Ready to be merged

Copy link

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 1aaed3d:

Sandbox Source
jovial-dubinsky-twc2wc Issue #1153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User Events: keyboard does not target focused element with shadow dom
1 participant