You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see what is happening here. When trapFocus is enabled on the Popover.Content, it will focus the first focusable element on open. Perhaps to alleviate this, we can prioritize items with tabindex={0} over tabindex={-1}.
This is actually an issue outside the popover, it's just more pronounced in the popover since it focuses automatically. The active tab should have tabindex={0} and all inactive ones should have tabindex={-1}; in your reproduction, the first tab always has tabindex={0}, which is incorrect.
I'll get this one fixed asap!
huntabyte
changed the title
Initial tabs values ignored when tabs nested in popover
Selected Tab.Trigger should have tabindex of 0Nov 19, 2024
Describe the bug
Tabs behave differently when in a popover, where it ignores the initial value on
<Tabs.Root value="tab-1">
.Reproduction
https://stackblitz.com/edit/github-bk6jdm-hvrwtm?file=src%2Froutes%2F%2Bpage.svelte
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: