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

Ensure tabbing to a portalled <PopoverPanel> component moves focus inside (without using <PortalGroup>) #3239

Merged
merged 3 commits into from
May 24, 2024

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented May 24, 2024

This PR fixes a bug where pressing tab on a <PopoverButton> does not move focus inside of a portalled <PopoverPanel> component when it is opened and when you are not using a wrapping <PopoverGroup> component.

If you didn't use a <Portal /> or portal or anchor prop then this would not be an issue.
If you used a <PopoverGroup /> then this would not be an issue.

Fixes: #3231

We already checked this button when inside of a `PopoverGroup`, but we
didn't when you weren't using a `PopoverGroup` component.
Copy link

vercel bot commented May 24, 2024

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

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 24, 2024 9:40pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 24, 2024 9:40pm

@RobinMalfait RobinMalfait merged commit c2754bc into main May 24, 2024
8 checks passed
@RobinMalfait RobinMalfait deleted the fix/issue-3231 branch May 24, 2024 21:48
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.

Popover panel incorrectly closes when user tabs with keyboard
1 participant