fix(modal-confirmation): refine escape key handling to ensure modal closes only when open

- Updated the keydown event handler to check if the modal is open before executing the close and reset functions, improving the modal's behavior and user experience.
This commit is contained in:
Andras Bacsai 2025-10-08 13:29:58 +02:00
parent adf5bbd91a
commit e8b2ef0e0c

View file

@ -114,7 +114,7 @@
}
}
}"
@keydown.escape.window="modalOpen = false; resetModal()" :class="{ 'z-40': modalOpen }"
@keydown.escape.window="if (modalOpen) { modalOpen = false; resetModal(); }" :class="{ 'z-40': modalOpen }"
class="relative w-auto h-auto">
@if ($customButton)
@if ($buttonFullWidth)