From 63e0cbc0a4a6309efdad653265580e50a89ff9f9 Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Mon, 1 Jun 2026 12:38:26 +0200 Subject: [PATCH] fix(tv): keep focus on search field instead of jumping to results grid On the Apple TV search page, the native tvOS search field owns focus while typing. Both result renderers set hasTVPreferredFocus on their first item, which re-requests focus on every re-render. Since results re-render on each keystroke, the first poster kept yanking focus out of the search field into the grid. Stop search results from requesting preferred focus in both Library and Discover modes; the user navigates down to the grid manually (standard tvOS .searchable behavior). --- components/search/TVJellyseerrSearchResults.tsx | 14 +++++++------- components/search/TVSearchPage.tsx | 8 ++++++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/components/search/TVJellyseerrSearchResults.tsx b/components/search/TVJellyseerrSearchResults.tsx index cba3a5548..699c50401 100644 --- a/components/search/TVJellyseerrSearchResults.tsx +++ b/components/search/TVJellyseerrSearchResults.tsx @@ -401,10 +401,6 @@ export const TVJellyseerrSearchResults: React.FC< }) => { const { t } = useTranslation(); - const hasMovies = movieResults && movieResults.length > 0; - const hasTv = tvResults && tvResults.length > 0; - const hasPersons = personResults && personResults.length > 0; - if (loading) { return null; } @@ -431,22 +427,26 @@ export const TVJellyseerrSearchResults: React.FC< return ( + {/* No section requests `hasTVPreferredFocus`: the native search field + keeps focus while typing, otherwise the first result would re-grab + focus on every keystroke as results re-render. The user navigates + down to the grid manually. */} diff --git a/components/search/TVSearchPage.tsx b/components/search/TVSearchPage.tsx index ab928d845..54ad07e1e 100644 --- a/components/search/TVSearchPage.tsx +++ b/components/search/TVSearchPage.tsx @@ -280,13 +280,17 @@ export const TVSearchPage: React.FC = ({ {/* Library Search Results */} {isLibraryMode && !loading && ( - {sections.map((section, index) => ( + {sections.map((section) => (