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

[Bug]: <FocusTrap /> does not recognize <Tab />s as focusable elements on first mount #771

Closed
LoganDark opened this issue Aug 29, 2021 · 2 comments · Fixed by #1231
Closed
Assignees

Comments

@LoganDark
Copy link

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

1.4.0

What browser are you using?

N/A

Reproduction repository

N/A

Describe your issue

When I have a dialog containing Tabs (as in, a TabGroup containing a TabList containing multiple Tabs), the FocusTrap still throws a fit because it thinks the tabs don't exist. This could be because the logic is weird, or maybe on first mount the TabGroup/TabList/Tabs don't actually render for whatever reason? Still, it's a bit weird.

@Axedyson
Copy link

Axedyson commented Feb 3, 2022

What you basically need to do is the following:
#265 (comment)
I consider that a workaround not a proper solution, so you should probably still keep this issue open

@RobinMalfait
Copy link
Collaborator

Hey! Thank you for your bug report!
Much appreciated! 🙏

This should be fixed by #1231, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/react@insiders or yarn add @headlessui/react@insiders.
  • npm install @headlessui/vue@insiders or yarn add @headlessui/vue@insiders.

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 a pull request may close this issue.

3 participants