From b03256b53b4359510e66c2e4f839585301a9d83c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 23 Jun 2024 19:18:03 +0200 Subject: [PATCH] Hotkeys: Navigate to search page if input is not available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/features/ui/util/global-hotkeys.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/features/ui/util/global-hotkeys.tsx b/src/features/ui/util/global-hotkeys.tsx index 781ff7666..0d1d09f42 100644 --- a/src/features/ui/util/global-hotkeys.tsx +++ b/src/features/ui/util/global-hotkeys.tsx @@ -70,6 +70,8 @@ const GlobalHotkeys: React.FC = ({ children, node }) => { if (element) { element.focus(); + } else { + history.push('/search'); } };