From b30c3b9a65cdc917fc8c3da1be7d252a123e465b Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 30 May 2026 10:42:49 +0300 Subject: [PATCH] When changing global search tab, focus input Closes #3117 --- app/components/layout/GlobalSearch.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/components/layout/GlobalSearch.tsx b/app/components/layout/GlobalSearch.tsx index 73f0df52f..4eae9ffe8 100644 --- a/app/components/layout/GlobalSearch.tsx +++ b/app/components/layout/GlobalSearch.tsx @@ -271,6 +271,10 @@ function GlobalSearchContent({ setSelectedWeapon(null); }; + const handleSearchTypeClick = () => { + inputRef.current?.focus(); + }; + const handleQueryChange = (e: React.ChangeEvent) => { const value = e.target.value; const separatorMatch = value.match(/^([a-zA-Z]+)\.$/); @@ -354,6 +358,7 @@ function GlobalSearchContent({ key={type} value={type} className={styles.searchTypeRadioWrapper} + onClick={handleSearchTypeClick} > {({ isSelected, isHovered, isFocusVisible }) => (