From 86a6063c6539d2002d8010ec5521f4540a1efc1b Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 8 Dec 2021 02:00:34 -0500 Subject: [PATCH] Fix keybind on Win changing focus to addrbar --- components/fuzzy-bar.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/fuzzy-bar.tsx b/components/fuzzy-bar.tsx index 6db7b88..e133c84 100644 --- a/components/fuzzy-bar.tsx +++ b/components/fuzzy-bar.tsx @@ -44,15 +44,19 @@ function FuzzyBar(): JSX.Element { useEffect(() => { const event = (e: KeyboardEvent) => { if (e.code === 'KeyK' && (e.ctrlKey || e.metaKey)) { + e.preventDefault(); toggleSearch(); } if (e.code === 'KeyP' && (e.ctrlKey || e.metaKey) && e.shiftKey) { + e.preventDefault(); alert('not really sure what to do here lol'); } if (show) searchField.current?.focus(); + + return false; } window.addEventListener('keydown', event);