c6fc76f532
React Aria's `CollectionBuilder` renders `TabList`'s children into both a hidden collection-building tree and the real DOM. The hidden instance of `TabsIndicators` sits outside the `TabListStateContext` provider, so its `state` is `null` — causing its `updateCSSVariables` effect to hit the `else` branch and write `--active-tab-opacity: 0` to the `tabsRef` DOM element that the real instance also writes to. Under the right render ordering, this hidden write lands after the real instance's `opacity: 1` and makes the active indicator disappear on uncontrolled Tabs. Guard `updateCSSVariables` with an early return when `state == null` so the hidden instance never writes to the shared DOM element. Signed-off-by: Johan Persson <johanopersson@gmail.com>
172 B
172 B
@backstage/ui
| @backstage/ui |
|---|
| patch |
Fixed an issue where the active tab indicator would disappear shortly after page load for uncontrolled Tabs.
Affected components: Tabs