Skip to content

Commit 7e9a1b7

Browse files
committed
fix(VDialog): emit afterEnter before setting focus
1 parent b861d8c commit 7e9a1b7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: packages/vuetify/src/components/VDialog/VDialog.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export const VDialog = genericComponent<OverlaySlots>()({
4343

4444
emits: {
4545
'update:modelValue': (value: boolean) => true,
46+
afterEnter: () => true,
4647
afterLeave: () => true,
4748
},
4849

@@ -89,6 +90,7 @@ export const VDialog = genericComponent<OverlaySlots>()({
8990
}
9091

9192
function onAfterEnter () {
93+
emit('afterEnter')
9294
if (overlay.value?.contentEl && !overlay.value.contentEl.contains(document.activeElement)) {
9395
overlay.value.contentEl.focus({ preventScroll: true })
9496
}

0 commit comments

Comments
 (0)