From 08df1d9d44d873c95da630f3e358ce2a2af0ee63 Mon Sep 17 00:00:00 2001 From: freeplay Date: Sat, 24 Jun 2023 15:02:54 -0400 Subject: [PATCH] fix: focus first element inside modal --- packages/client/src/components/MkModal.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/client/src/components/MkModal.vue b/packages/client/src/components/MkModal.vue index c65cc0fdcd..d48b6cbc54 100644 --- a/packages/client/src/components/MkModal.vue +++ b/packages/client/src/components/MkModal.vue @@ -381,6 +381,8 @@ onMounted(() => { { immediate: true } ); + content.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')?.focus(); + nextTick(() => { new ResizeObserver((entries, observer) => { align();