Skip to content

Commit

Permalink
fix: when modal and drawer exist at the same time, click Close All (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb authored Sep 26, 2024
1 parent 17fa8eb commit 26646d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit 26646d4

Please sign in to comment.