From b8369a9d18c16d884f294d613018c64a377faaec Mon Sep 17 00:00:00 2001 From: Kael Date: Fri, 9 Sep 2022 01:32:53 +1000 Subject: [PATCH] fix(VDialog): don't try to focus tabindex="-1" or hidden inputs fixes #15745 --- packages/vuetify/src/components/VDialog/VDialog.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vuetify/src/components/VDialog/VDialog.tsx b/packages/vuetify/src/components/VDialog/VDialog.tsx index 6dcdd26a390..ebc9d76ff03 100644 --- a/packages/vuetify/src/components/VDialog/VDialog.tsx +++ b/packages/vuetify/src/components/VDialog/VDialog.tsx @@ -70,8 +70,8 @@ export const VDialog = genericComponent { !overlay.value.contentEl.contains(after) ) { const focusable = [...overlay.value.contentEl.querySelectorAll( - 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])' - )].filter(el => !el.hasAttribute('disabled')) as HTMLElement[] + 'button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])' + )].filter(el => !el.hasAttribute('disabled') && !el.matches('[tabindex="-1"]')) as HTMLElement[] if (!focusable.length) return