From f68a1144df2a742c549a7a1223a0d88a95b8fbe9 Mon Sep 17 00:00:00 2001 From: dawn <90008@gaze.systems> Date: Sat, 30 May 2026 07:09:24 +0300 Subject: [PATCH] dont focus search bar if already focused on another text input --- src/layout.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/layout.tsx b/src/layout.tsx index 08b871e..56f96af 100644 --- a/src/layout.tsx +++ b/src/layout.tsx @@ -285,6 +285,11 @@ const TopbarSearch: Component = () => { const handler = (e: KeyboardEvent) => { if (e.ctrlKey || e.metaKey) return; if (e.key === "/") { + const active = document.activeElement; + if (active && (active.tagName === 'INPUT' || active.tagName === 'TEXTAREA' || (active as HTMLElement).isContentEditable)) { + return; + } + e.preventDefault(); inputRef?.focus(); } else if (e.key === "Escape") { -- 2.51.2