fix(Modal/Slideover): prevent esc with prevent-close prop

Resolves #2501
This commit is contained in:
Benjamin Canac
2024-11-10 10:19:47 +01:00
parent ea97759c2c
commit 9e2cc5b125
2 changed files with 4 additions and 2 deletions

View File

@@ -95,7 +95,8 @@ const contentEvents = computed(() => {
if (props.preventClose) {
return {
pointerDownOutside: (e: Event) => e.preventDefault(),
interactOutside: (e: Event) => e.preventDefault()
interactOutside: (e: Event) => e.preventDefault(),
escapeKeyDown: (e: Event) => e.preventDefault()
}
}

View File

@@ -94,7 +94,8 @@ const contentEvents = computed(() => {
if (props.preventClose) {
return {
pointerDownOutside: (e: Event) => e.preventDefault(),
interactOutside: (e: Event) => e.preventDefault()
interactOutside: (e: Event) => e.preventDefault(),
escapeKeyDown: (e: Event) => e.preventDefault()
}
}