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

Simplify Popover Tab logic by using sentinel nodes instead of keydown event interception #1440

Merged
merged 3 commits into from May 12, 2022

Conversation

RobinMalfait
Copy link
Collaborator

This PR will simplify the Popover component by using the same strategy we applied in the
FocusTrap component.

This uses sentinel DOM nodes instead of keydown event interception and manually trying to focus
the next element. This improves a bunch of subtle bugs because now the browser will handle all of
the Tab related logic. This means that it fixes the following bugs for free:

Fixes: #1215
Fixes: #1140
Fixes: #467

Use `TabSentinel` instead of intercepting the `Tab` keydown events.
@vercel
Copy link

vercel bot commented May 12, 2022

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

Name Status Preview Updated
headlessui-react ✅ Ready (Inspect) Visit Preview May 12, 2022 at 10:15PM (UTC)
headlessui-vue ✅ Ready (Inspect) Visit Preview May 12, 2022 at 10:15PM (UTC)

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