From 2da07fb90c40f4f8e69bfb62f375a8ad78a29825 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 17 Apr 2023 18:59:01 +0100 Subject: [PATCH] Prevent sheet handling key events sourcing from modals --- .../src/components/sheet/overlays/KeyboardManager.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/frontend-core/src/components/sheet/overlays/KeyboardManager.svelte b/packages/frontend-core/src/components/sheet/overlays/KeyboardManager.svelte index a9b733c89a..486ec29fb2 100644 --- a/packages/frontend-core/src/components/sheet/overlays/KeyboardManager.svelte +++ b/packages/frontend-core/src/components/sheet/overlays/KeyboardManager.svelte @@ -40,6 +40,11 @@ return } } + + // Avoid processing events sourced from modals + if (e.target?.closest?.(".spectrum-Modal")) { + return + } e.preventDefault() // Handle the key ourselves