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:
parent
adf5bbd91a
commit
e8b2ef0e0c
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue