From ded69cd9c7368d88ae25e2622573767fccfaaf42 Mon Sep 17 00:00:00 2001 From: Xylight Date: Fri, 19 Jul 2024 18:46:22 -0700 Subject: [PATCH] qol: don't show command prompt on / if anything is focused --- src/lib/components/ui/navbar/commands/Commands.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/components/ui/navbar/commands/Commands.svelte b/src/lib/components/ui/navbar/commands/Commands.svelte index 5fd3b498..e6bc49e7 100644 --- a/src/lib/components/ui/navbar/commands/Commands.svelte +++ b/src/lib/components/ui/navbar/commands/Commands.svelte @@ -127,7 +127,10 @@ } function handleKeydown(event: KeyboardEvent) { - if ((event.ctrlKey && event.key === 'k') || event.key == '/') { + if ( + (event.ctrlKey && event.key === 'k') || + (event.key == '/' && document.activeElement == document.body) + ) { event.preventDefault() togglePalette() }