-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Modal] Prevent focus steal from other windows #20694
Merged
oliviertassinari
merged 6 commits into
mui:master
from
eps1lon:fix/TrapFocus/window-steal
Apr 23, 2020
Merged
[Modal] Prevent focus steal from other windows #20694
oliviertassinari
merged 6 commits into
mui:master
from
eps1lon:fix/TrapFocus/window-steal
Apr 23, 2020
Conversation
This file contains 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
Details of bundle changes.Comparing: e4e1d4e...c0362a2 Details of page changes
|
eps1lon
force-pushed
the
fix/TrapFocus/window-steal
branch
3 times, most recently
from
April 22, 2020 16:58
70cd1f5
to
9a53f49
Compare
eps1lon
added
accessibility
a11y
bug 🐛
Something doesn't work
component: modal
This is the name of the generic UI component, not the React module!
labels
Apr 22, 2020
eps1lon
force-pushed
the
fix/TrapFocus/window-steal
branch
from
April 22, 2020 21:12
9a53f49
to
6a50184
Compare
eps1lon
changed the title
[TrapFocus] Don't contain if document isn't focused
[Modal] Don't contain if document isn't focused
Apr 22, 2020
eps1lon
changed the title
[Modal] Don't contain if document isn't focused
[Modal] Prevent focus steal from other windows
Apr 22, 2020
eps1lon
force-pushed
the
fix/TrapFocus/window-steal
branch
from
April 22, 2020 21:26
6a50184
to
029d2a2
Compare
oliviertassinari
approved these changes
Apr 22, 2020
eps1lon
force-pushed
the
fix/TrapFocus/window-steal
branch
from
April 23, 2020 13:10
aeffbfc
to
b648fd9
Compare
@eps1lon Great! Codesandbox/Stackblitz developers will notice this change 😁 |
This was referenced Apr 29, 2020
This was referenced Apr 29, 2020
This was referenced May 7, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
accessibility
a11y
bug 🐛
Something doesn't work
component: FocusTrap
The React component.
component: modal
This is the name of the generic UI component, not the React module!
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.
Fix is working. test_browser fails on old test that are migrated to testing-library. Need to figure out why. Actual fix is green.
Don't contain focus if the owner document isn't focused. This can happen if we render a Modal in iframes and click outside of the frame. Codesandbox with permanently open Modals is a prominent example.
PR is split into three parts:
Fixture using
latest
(4.9.11
): https://codesandbox.io/s/mui-focus-lock-okx94?file=/src/Demo.jsFixture using this PR: https://codesandbox.io/s/twilight-brook-zrmk1?file=/src/Demo.js