Popup: Set tabindex to -1 to fix Esc on keydown event handler#7839
Merged
dzearing merged 3 commits intomicrosoft:masterfrom Jan 30, 2019
Merged
Popup: Set tabindex to -1 to fix Esc on keydown event handler#7839dzearing merged 3 commits intomicrosoft:masterfrom
dzearing merged 3 commits intomicrosoft:masterfrom
Conversation
leddie24
approved these changes
Jan 29, 2019
dzearing
approved these changes
Jan 30, 2019
Contributor
|
🎉 Handy links: |
This was referenced Feb 20, 2019
Merged
Member
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Popups - like Callout or Modal - have an issue where when you click inside of a Fabric popup (but not on an actual keyboard focusable item – just in the blank area of the popup) and then hit ESC, the popup does not close.
This is happening because clicking in the popup causes focus to go to the document itself which is outside of the popup so the appropriate keydown event handler on the popup is not hit.
This change adds a tabindex of -1 to the Popup component so that focus will go to the Popup itself on click, allowing the appropriate keydown event handler to be trigger.
Focus areas to test
All Popup components, especially as relates to keyboard focus, tab order and clicking.
Microsoft Reviewers: Open in CodeFlow