Merge pull request #1853 from domsleee/fix/modal-closing-on-mouseup

fix: modal should not close when dragging from inside of modal
This commit is contained in:
Timothy Jaeryang Baek 2024-04-29 15:45:46 -07:00 committed by GitHub
commit c523126bae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,7 +51,7 @@
bind:this={modalElement} bind:this={modalElement}
class=" fixed top-0 right-0 left-0 bottom-0 bg-black/60 w-full min-h-screen h-screen flex justify-center z-[9999] overflow-hidden overscroll-contain" class=" fixed top-0 right-0 left-0 bottom-0 bg-black/60 w-full min-h-screen h-screen flex justify-center z-[9999] overflow-hidden overscroll-contain"
in:fade={{ duration: 10 }} in:fade={{ duration: 10 }}
on:click={() => { on:mousedown={() => {
show = false; show = false;
}} }}
> >
@ -60,7 +60,7 @@
size size
)} mx-2 bg-gray-50 dark:bg-gray-900 shadow-3xl" )} mx-2 bg-gray-50 dark:bg-gray-900 shadow-3xl"
in:flyAndScale in:flyAndScale
on:click={(e) => { on:mousedown={(e) => {
e.stopPropagation(); e.stopPropagation();
}} }}
> >