Fixed focus issues on modals closing

This commit is contained in:
Alexis
2025-03-01 14:37:47 +01:00
parent ba3eb29e04
commit 71866b0e4b
6 changed files with 6 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ function handleClose() {
<template>
<UiAlertDialog :open="modalState">
<UiAlertDialogContent class="grid grid-rows-[auto_1fr_auto] items-start min-h-[66vh] max-w-4xl gap-6">
<UiAlertDialogContent class="grid grid-rows-[auto_1fr_auto] items-start min-h-[66vh] max-w-4xl gap-6" @close-auto-focus="(e) => e.preventDefault()">
<UiAlertDialogTitle>
<span class="text-2xl">
<strong class="font-bold">{{ world.name }}</strong>

View File

@@ -66,6 +66,7 @@ function handleClosing() {
@focus-outside="handleClosing"
@interact-outside="handleClosing"
@pointer-down-outside="handleClosing"
@close-auto-focus="(e) => e.preventDefault()"
>
<UiAlertDialogTitle>
{{ $t('entity.calendar.deleteDialog.title') }}

View File

@@ -20,7 +20,7 @@ function handleClose() {
<template>
<UiAlertDialog :open="modalState">
<UiAlertDialogContent class="gap-4">
<UiAlertDialogContent class="gap-4" @close-auto-focus="(e) => e.preventDefault()">
<header>
<UiAlertDialogTitle>
<span class="text-2xl">

View File

@@ -66,6 +66,7 @@ function handleClosing() {
@focus-outside="handleClosing"
@interact-outside="handleClosing"
@pointer-down-outside="handleClosing"
@close-auto-focus="(e) => e.preventDefault()"
>
<UiAlertDialogTitle>
{{ $t('entity.world.deleteDialog.title') }}

View File

@@ -25,7 +25,7 @@ function handleClose() {
<template>
<UiAlertDialog :open="modalState">
<UiAlertDialogContent class="gap-4">
<UiAlertDialogContent class="gap-4" @close-auto-focus="(e) => e.preventDefault()">
<header>
<UiAlertDialogTitle>
<span class="text-2xl">