From 359390292a7fa899a3f101bbaf28056cbec470e5 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Wed, 23 Sep 2026 18:49:38 +0300 Subject: [PATCH] Fix global search flicker --- app/components/elements/Radio.tsx | 9 ++++++++- app/components/layout/GlobalSearch.tsx | 5 +++++ changelog/2026-09-23-global-search-tab-flicker.md | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 changelog/2026-09-23-global-search-tab-flicker.md diff --git a/app/components/elements/Radio.tsx b/app/components/elements/Radio.tsx index 7c74d6447..6b2b72e8d 100644 --- a/app/components/elements/Radio.tsx +++ b/app/components/elements/Radio.tsx @@ -18,6 +18,7 @@ export function SendouRadioGroup({ isDisabled, className, "aria-label": ariaLabel, + onMouseDown, children, }: { value: string | null; @@ -25,12 +26,18 @@ export function SendouRadioGroup({ isDisabled?: boolean; className?: string; "aria-label"?: string; + onMouseDown?: (e: React.MouseEvent) => void; children: React.ReactNode; }) { const name = React.useId(); return ( -
+
{children} diff --git a/app/components/layout/GlobalSearch.tsx b/app/components/layout/GlobalSearch.tsx index 8fe861640..5dd168e68 100644 --- a/app/components/layout/GlobalSearch.tsx +++ b/app/components/layout/GlobalSearch.tsx @@ -343,6 +343,7 @@ function GlobalSearchContent({ onChange={handleSearchTypeChange} aria-label="Search type" className={styles.searchTypeRadioGroup} + onMouseDown={preventFocusLeavingInput} > {SEARCH_TYPES.map((type) => ( ["results"][number]; function getResultKey(result: SearchResult): string { diff --git a/changelog/2026-09-23-global-search-tab-flicker.md b/changelog/2026-09-23-global-search-tab-flicker.md new file mode 100644 index 000000000..8571ea0e9 --- /dev/null +++ b/changelog/2026-09-23-global-search-tab-flicker.md @@ -0,0 +1,4 @@ +--- +type: bug +--- +Switching tabs in search no longer makes the search field flicker