From d4339fe769c9f990a9d0b28af47fc2eb06b50296 Mon Sep 17 00:00:00 2001 From: Dom Slee Date: Mon, 29 Apr 2024 18:11:35 +1000 Subject: [PATCH] fix: modal should not close when dragging from inside of modal --- src/lib/components/common/Modal.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/common/Modal.svelte b/src/lib/components/common/Modal.svelte index 6d8b82992..8c694d2ac 100644 --- a/src/lib/components/common/Modal.svelte +++ b/src/lib/components/common/Modal.svelte @@ -51,7 +51,7 @@ 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" in:fade={{ duration: 10 }} - on:click={() => { + on:mousedown={() => { show = false; }} > @@ -60,7 +60,7 @@ size )} mx-2 bg-gray-50 dark:bg-gray-900 shadow-3xl" in:flyAndScale - on:click={(e) => { + on:mousedown={(e) => { e.stopPropagation(); }} >