From e7341087b63314375eb44e0cdd3cc894970e931e Mon Sep 17 00:00:00 2001 From: David Fidler <13830158+dfidler@users.noreply.github.com> Date: Fri, 27 Feb 2026 13:21:11 +0000 Subject: [PATCH] fix(Tabs): only force-mount TabsContent during SSR Fixes https://github.com/unovue/reka-ui/issues/2476 The Presence component inside TabsContent has force-mount hardcoded, keeping all inactive tab panels in the DOM. This causes inactive tabs to be visible when any CSS display property (e.g. display:flex) is set on TabsContent, as it overrides the hidden attribute's display:none. This change conditionally applies force-mount only during SSR (when document is undefined) or when the user explicitly passes the forceMount prop, using the existing isBrowser utility. --- packages/core/src/Tabs/TabsContent.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/Tabs/TabsContent.vue b/packages/core/src/Tabs/TabsContent.vue index 2a8bcb2acd..bc87419c65 100644 --- a/packages/core/src/Tabs/TabsContent.vue +++ b/packages/core/src/Tabs/TabsContent.vue @@ -18,6 +18,7 @@ export interface TabsContentProps extends PrimitiveProps { import { computed, onBeforeUnmount, onMounted, ref } from 'vue' import { Presence } from '@/Presence' import { Primitive } from '@/Primitive' +import { isBrowser } from '@/shared/browser' import { injectTabsRootContext } from './TabsRoot.vue' import { makeContentId, makeTriggerId } from './utils' @@ -48,7 +49,7 @@ onBeforeUnmount(() => {