-
Notifications
You must be signed in to change notification settings - Fork 536
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
Activate focus trap when clicking inside AnchoredOverlay #1210
Comments
Browser specific? I couldn't repro this with Chrome on Windows. Clicking in that margin doesn't seem to move focus at all (checked with a Edit: Looks like this was fixed in #1209. Can we close the issue? |
@T-Hugs thanks for checking in 😄. You are correct that it's not possible to reproduce it now. However, the reason it can't be reproduced is that we are now preventing default on mouse down events that bubble to |
That makes sense! |
Describe the bug
AnchoredOverlay
currently only activates the internal focus trap if the user interacts with the anchor element in specific ways. New uses of theAnchoredOverlay
include behaviors where a user can click inside the overlay multiple times, which removes focus from the anchor without activating the focus trap. In these scenarios, the user is able to tab to other parts of the DOM without restriction. We should handle this scenario and activate the focus trap if the anchor loses focus in some unexpected way.To Reproduce
Steps to reproduce the behavior:
Tab
to focus on other parts of the pageExpected behavior
If focus leaves the anchor without the overlay closing, focus trap should activate immediately
The text was updated successfully, but these errors were encountered: