Skip to content

Commit 04663d9

Browse files
committed
fix(VDialog): no viewport margin for fullscreen dialog
1 parent e10e1c8 commit 04663d9

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

packages/vuetify/src/components/VDialog/VDialog.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ import { useScopeId } from '@/composables/scopeId'
1414

1515
// Utilities
1616
import { mergeProps, nextTick, ref, watch } from 'vue'
17-
import { genericComponent, omit, propsFactory, useRender } from '@/util'
17+
import { genericComponent, noop, omit, propsFactory, useRender } from '@/util'
1818

1919
// Types
2020
import type { OverlaySlots } from '@/components/VOverlay/VOverlay'
21+
import type { LocationStrategyFunction } from '@/types'
2122

2223
export const makeVDialogProps = propsFactory({
2324
fullscreen: Boolean,
@@ -75,13 +76,19 @@ export const VDialog = genericComponent<OverlaySlots>()({
7576

7677
useRender(() => {
7778
const overlayProps = VOverlay.filterProps(props)
79+
7880
const activatorProps = mergeProps({
7981
'aria-haspopup': 'dialog',
8082
}, props.activatorProps)
83+
8184
const contentProps = mergeProps({
8285
tabindex: -1,
8386
}, props.contentProps)
8487

88+
const locationStrategy = props.fullscreen
89+
? noop as LocationStrategyFunction
90+
: props.locationStrategy
91+
8592
return (
8693
<VOverlay
8794
ref={ overlay }
@@ -103,6 +110,7 @@ export const VDialog = genericComponent<OverlaySlots>()({
103110
width={ !props.fullscreen ? props.width : undefined }
104111
maxHeight={ !props.fullscreen ? props.maxHeight : undefined }
105112
maxWidth={ !props.fullscreen ? props.maxWidth : undefined }
113+
locationStrategy={ locationStrategy }
106114
role="dialog"
107115
onAfterEnter={ onAfterEnter }
108116
onAfterLeave={ onAfterLeave }

0 commit comments

Comments
 (0)