FocusTrapZone - restore last focused descendant element#5103
Merged
jspurlin merged 18 commits intomicrosoft:masterfrom Jun 6, 2018
bworline:ftz-rememberlastfocused
Merged
FocusTrapZone - restore last focused descendant element#5103jspurlin merged 18 commits intomicrosoft:masterfrom bworline:ftz-rememberlastfocused
jspurlin merged 18 commits intomicrosoft:masterfrom
bworline:ftz-rememberlastfocused
Conversation
…g it when the FTZ gets focus.
…c-react into ftz-rememberlastfocused
…c-react into ftz-rememberlastfocused
# Conflicts: # packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.test.tsx # packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx # packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.types.ts
Contributor
Author
|
@cliffkoh Can you review? |
cliffkoh
approved these changes
Jun 5, 2018
Contributor
cliffkoh
left a comment
There was a problem hiding this comment.
Looks awesome to me. It would be great to get one more approval from a "scenario owner".
| } | ||
|
|
||
| it('goes to previously focused element when focusing the FTZ', async () => { | ||
| expect.assertions(4); |
Contributor
Author
|
@jspurlin , I removed all auto-focusing when the control gets focus (w.r.t. the previous version of this PR). Now it only does its thing when .focus() is called. Can you take a look? |
Contributor
Author
|
@jspurlin is added to the review. #Closed |
jspurlin
reviewed
Jun 6, 2018
Contributor
jspurlin
left a comment
There was a problem hiding this comment.
Can you add the validation you performed for this PR?
Contributor
Author
|
Validation: Unit tests cover added behavior around focusing when focus() is called. Checked word-online demo app for regressions in ribbon. |
jspurlin
approved these changes
Jun 6, 2018
Markionium
added a commit
to Markionium/office-ui-fabric-react
that referenced
this pull request
Jun 6, 2018
* master: Part 2 of demo page refactor (microsoft#5089) Update jest.js fixing official example page and datepicker/calendar components using… (microsoft#5108) Don't run prettier and tslint in parallel as it might cause conflicts (microsoft#5100) FocusTrapZone - restore last focused descendant element (microsoft#5103) Coachmark/TeachingBubble: Fix SCSS selectors for buttons and Close Icon (microsoft#4835) HoverCard: IE11 fix (microsoft#5105)
Markionium
added a commit
to Markionium/office-ui-fabric-react
that referenced
this pull request
Jun 6, 2018
* master: Charting (microsoft#4954) Deprecation lint rule! (microsoft#5109) Implement selection for selected items list (microsoft#5036) Ignore common/changes and don't prettify json files (microsoft#5112) Part 2 of demo page refactor (microsoft#5089) Update jest.js fixing official example page and datepicker/calendar components using… (microsoft#5108) Don't run prettier and tslint in parallel as it might cause conflicts (microsoft#5100) FocusTrapZone - restore last focused descendant element (microsoft#5103) Coachmark/TeachingBubble: Fix SCSS selectors for buttons and Close Icon (microsoft#4835) HoverCard: IE11 fix (microsoft#5105)
Markionium
added a commit
to Markionium/office-ui-fabric-react
that referenced
this pull request
Jun 6, 2018
* master: (31 commits) Charting (microsoft#4954) Deprecation lint rule! (microsoft#5109) Implement selection for selected items list (microsoft#5036) Ignore common/changes and don't prettify json files (microsoft#5112) Part 2 of demo page refactor (microsoft#5089) Update jest.js fixing official example page and datepicker/calendar components using… (microsoft#5108) Don't run prettier and tslint in parallel as it might cause conflicts (microsoft#5100) FocusTrapZone - restore last focused descendant element (microsoft#5103) Coachmark/TeachingBubble: Fix SCSS selectors for buttons and Close Icon (microsoft#4835) HoverCard: IE11 fix (microsoft#5105) FocusTrapZone bug allows breaking out of the trap (microsoft#4898) Applying package updates. Update ISSUE_TEMPLATE.md Experiment/Nav component: hide nav group header if all the links under it are hidden (microsoft#5095) Add optional prop to not dismiss Callout on focus loss (microsoft#5092) Experiments: moves ShimmerTile from Shimmer to Tile. (microsoft#5090) Run jest in parallel on Windows (microsoft#5096) Applying package updates. Major bump jest-serializer-merge-styles ...
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.
Added FocusTrapZone capability: When FTZ.focus() is called, it will pass focus to a descendant element. The new prop 'focusPreviouslyFocusedInnerElement' controls the descendant-choosing behavior, allowing you to focus either the first descendant or the previously focused descendant.
Unit tests added.
Microsoft Reviewers: Open in CodeFlow