Skip to content

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

Open
andreisaperski wants to merge 1 commit intomicrosoft:mainfrom
andreisaperski:fix/focusable-shadow-root
Open

fix: allows dispatching keyborg:focusin on focusable shadow root#81
andreisaperski wants to merge 1 commit intomicrosoft:mainfrom
andreisaperski:fix/focusable-shadow-root

Conversation

@andreisaperski
Copy link
Copy Markdown

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 a team and mshoho 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