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

Allow root containers from the Dialog component in the FocusTrap component #2322

Merged
merged 4 commits into from
Mar 1, 2023

Conversation

RobinMalfait
Copy link
Collaborator

This PR fixes an issue where the FocusTrap is not properly handled for allowed root containers (like 3rd party containers).

When using the FocusTrap component inside of the Dialog, then only the Dialog was considered one of the containers. However, we should keep all the allowed containers into account just like how we handle them for outside click and escape behaviour.

Fixes: #2312

@vercel
Copy link

vercel bot commented Mar 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 1, 2023 at 5:07PM (UTC)
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 1, 2023 at 5:07PM (UTC)

@RobinMalfait RobinMalfait changed the title Allow focus from FocusTrap in all allowed containers Allow root containers from the Dialog component in the FocusTrap component Mar 1, 2023
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.

Dialog focus bug with date range picker
1 participant