fix: when modal and drawer exist at the same time, click Close All (#4521)
parent
17fa8eb93b
commit
26646d42f7
|
@ -83,8 +83,8 @@ function escapeKeyDown(e: KeyboardEvent) {
|
|||
// pointer-down-outside
|
||||
function pointerDownOutside(e: Event) {
|
||||
const target = e.target as HTMLElement;
|
||||
const isDismissableModal = !!target?.dataset.dismissableModal;
|
||||
if (!closeOnClickModal.value || !isDismissableModal) {
|
||||
const dismissableDrawer = !!target?.dataset.dismissableDrawer;
|
||||
if (!closeOnClickModal.value || !dismissableDrawer) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@ useScrollLock();
|
|||
<template>
|
||||
<div
|
||||
class="bg-overlay fixed inset-0 z-[1000]"
|
||||
data-dismissable-modal="true"
|
||||
data-dismissable-drawer="true"
|
||||
></div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue