Closed jakobpesch closed 6 days ago
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}
.
I'll look into this.
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!
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