From 138dd98c0c7ba65f3af4d523a93cba9f701042a3 Mon Sep 17 00:00:00 2001 From: m1212e <14091540+m1212e@users.noreply.github.com> Date: Mon, 27 Feb 2023 12:25:33 +0100 Subject: [PATCH] fix: search hotkey prevent default (#1195) --- apps/web/src/components/quick-search/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/web/src/components/quick-search/index.tsx b/apps/web/src/components/quick-search/index.tsx index 541e98d2cf..252bc98ead 100644 --- a/apps/web/src/components/quick-search/index.tsx +++ b/apps/web/src/components/quick-search/index.tsx @@ -52,6 +52,8 @@ export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => { const down = (e: KeyboardEvent) => { if ((e.key === 'k' && e.metaKey) || (e.key === 'k' && e.ctrlKey)) { const selection = window.getSelection(); + // prevent search bar focus in firefox + e.preventDefault(); setQuery(''); if (selection?.toString()) { triggerQuickSearchModal(false);