Skip to content

Commit

Permalink
fix(VOverlay): check for Shadow DOM on mount (#19947)
Browse files Browse the repository at this point in the history
fixes #19943
  • Loading branch information
joelmandell authored Jun 11, 2024
1 parent 07a6fb8 commit e6e76d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vuetify/src/components/VOverlay/VOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ export const VOverlay = genericComponent<OverlaySlots>()({
if (!(v && props.disabled)) model.value = v
},
})
const { teleportTarget } = useTeleport(computed(() => props.attach || props.contained))
const { themeClasses } = provideTheme(props)
const { rtlClasses, isRtl } = useRtl()
const { hasContent, onAfterLeave: _onAfterLeave } = useLazy(props, isActive)
Expand All @@ -155,6 +154,9 @@ export const VOverlay = genericComponent<OverlaySlots>()({
contentEvents,
scrimEvents,
} = useActivator(props, { isActive, isTop: localTop })
const potentialShadowDomRoot = computed(() => (activatorEl?.value as Element)?.getRootNode() as Element)
const { teleportTarget } = useTeleport(computed(() => props.attach || props.contained ||
potentialShadowDomRoot.value instanceof ShadowRoot ? potentialShadowDomRoot.value : false))
const { dimensionStyles } = useDimension(props)
const isMounted = useHydration()
const { scopeId } = useScopeId()
Expand Down

0 comments on commit e6e76d5

Please sign in to comment.