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

fix: react modals should get focus after opening #709

Merged
merged 3 commits into from
Mar 21, 2022

Conversation

dylancom
Copy link
Contributor

@dylancom dylancom commented Mar 18, 2022

Modals triggered from a <Menu /> currently don't receive focus.
This is because @headless-ui/menu restores focus after closing a menu, to the button that opened it.
There is currently no way to change this behavior so a hack is needed.

More info + added comment: tailwindlabs/headlessui#259

Thanks @escapedcat for noticing it.

@github-actions
Copy link

Build files:

@dylancom dylancom changed the title fix: react modal should get focus after opening fix: react modals should get focus after opening Mar 18, 2022
@bumi bumi merged commit 04083eb into master Mar 21, 2022
@bumi bumi deleted the fix/react-modal-focus-management branch March 21, 2022 08:32
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

Successfully merging this pull request may close these issues.

None yet

3 participants