Skip to content

Commit

Permalink
fix(Drawer|Dialog): No longer stop mouseup event propgation, which fi…
Browse files Browse the repository at this point in the history
…xes closing Menu by clicking outside (within Dialog/Drawer) (#499)
  • Loading branch information
techniq authored Oct 20, 2024
1 parent 8af7ebb commit cfcb1b5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/many-tigers-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-ux': patch
---

fix(Drawer|Dialog): No longer stop mouseup event propgation, which fixes closing Menu by clicking outside (within Dialog/Drawer)
4 changes: 0 additions & 4 deletions packages/svelte-ux/src/lib/components/Dialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@
classes.root
)}
on:click={onClick}
on:mouseup={(e) => {
// Do not allow event to reach Popover's on:mouseup (clickOutside)
e.stopPropagation();
}}
on:keydown={(e) => {
if (e.key === 'Escape') {
// Do not allow event to reach Popover's on:keydown
Expand Down
4 changes: 0 additions & 4 deletions packages/svelte-ux/src/lib/components/Drawer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@
close();
}
}}
on:mouseup={(e) => {
// Do not allow event to reach Popover's on:mouseup (clickOutside)
e.stopPropagation();
}}
use:portalAction={portal}
use:focusMove={{ restoreFocus: true }}
role="dialog"
Expand Down

0 comments on commit cfcb1b5

Please sign in to comment.