Update focus handling in DatePicker and FocusTrapZone#8875
Merged
msft-github-bot merged 2 commits intomicrosoft:masterfrom May 2, 2019
Merged
Update focus handling in DatePicker and FocusTrapZone#8875msft-github-bot merged 2 commits intomicrosoft:masterfrom
msft-github-bot merged 2 commits intomicrosoft:masterfrom
Conversation
Contributor
|
Component perf results:
|
|
JasonGore
approved these changes
Apr 30, 2019
lorejoh12
approved these changes
Apr 30, 2019
Contributor
|
Hello @KevinTCoughlin! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me and give me an instruction to get started! Learn more here. |
Contributor
|
🎉 Handy links: |
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.
Pull request checklist
$ npm run changeDescription of changes
Issues encountered when DatePicker flyout is expanded and another element on the page requires focus ie: a modal alert dialog. In these instances the current focus handling will prevent another element from focusing and will return focus to the DatePicker TextField whenever the flyout is collapsed regardless of where the current focus is on the page ie: an entirely different element.
To support the above scenario DatePicker flyout should not aggressively keep focus and therefore should set the forceFocusInsideTrap to false of its FocusTrapZone. In addition, FocusTrapZone should not handle return focus if forceFocusInsideTrap is false and the currently focused element is not within the FocusTrapZone.
DatePicker should also allow FocusTrapZone to handle return focus exclusively. Removing out-of-date custom IE code wherein DatePicker interferes with return focus logic that should be the responsibility of FocusTrapZone.
Focus areas to test
FocusTrapZone
DatePicker