Skip to content
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

Make clickOutsideDeactivates=true return the focus if the click target is not focusable #60

Closed
egonolieux opened this issue Jul 20, 2018 · 0 comments

Comments

@egonolieux
Copy link

I'm having an issue building a drawer component using a backdrop (shadow overlay). When the backdrop is clicked, the drawer should be closed. Setting clickOutsideDeactivates to true is required for the click event on the backdrop to be fired, but it seems that enabling this setting does not return the focus to the button used to activate the drawer.

This is understandable because the element clicked outside the focus trap might be a focusable element itself. Thats why I would suggest to add an extra config option to toggle if the focus should be returned, or do an extra check if the element outside is focusable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant