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

fix: allows dispatching keyborg:focusin on focusable shadow root #81

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

Conversation

andreisaperski
Copy link

Keyborg doesn't dispatch keyborg:focusin for shadow roots when they get focus. Web components - e.g. fluent-button from Fluent UI Web Components - don't get keyborg:focusin dispatched for them because of that. The proposed fix lets keyborg:focusin event be dispatched for focused shadow root.

When focus goes back from element in shadow DOM to focusable shadow root (Shift+Tab), there's no focusin event dispatched for shadow root. The second part of the fix calls onFocusIn from focusOutHandler if relatedTarget of blur event is shadow root and it contains target element in its shadow DOM.

@andreisaperski andreisaperski requested review from mshoho and a team as code owners May 14, 2024 21:12
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.

1 participant