From 2ae697d9ed2e6079d1e73db483b586f9bb6f220a Mon Sep 17 00:00:00 2001 From: Kael Date: Wed, 29 Jun 2022 20:37:42 +1000 Subject: [PATCH] fix: update onFocusin --- packages/vuetify/src/components/VDialog/VDialog.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vuetify/src/components/VDialog/VDialog.ts b/packages/vuetify/src/components/VDialog/VDialog.ts index d18f73f41ac..1e4bcb5b3d9 100644 --- a/packages/vuetify/src/components/VDialog/VDialog.ts +++ b/packages/vuetify/src/components/VDialog/VDialog.ts @@ -233,9 +233,9 @@ export default baseMixins.extend().extend({ if ( !!target && // It isn't the document or the dialog body - ![document, this.$refs.content].includes(target) && + ![document, this.$refs.dialog].includes(target) && // It isn't inside the dialog body - !this.$refs.content.contains(target) && + !this.$refs.dialog.contains(target) && // We're the topmost dialog this.activeZIndex >= this.getMaxZIndex() && // It isn't inside a dependent element (like a menu) @@ -243,7 +243,7 @@ export default baseMixins.extend().extend({ // So we must have focused something outside the dialog and its children ) { // Find and focus the first available element inside the dialog - const focusable = this.$refs.content.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])') + const focusable = this.$refs.dialog.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])') const el = [...focusable].find(el => !el.hasAttribute('disabled')) as HTMLElement | undefined el && el.focus() }