From f5bbb2bf49b073aa0d14a5e06c2ababbeee2af1b Mon Sep 17 00:00:00 2001 From: Jarrod Moldrich Date: Sat, 18 Jan 2025 19:50:29 +1000 Subject: [PATCH] Add comment around button + search activation hacks --- Views/SearchResults.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Views/SearchResults.swift b/Views/SearchResults.swift index 02142a09..3311a5c5 100644 --- a/Views/SearchResults.swift +++ b/Views/SearchResults.swift @@ -37,11 +37,17 @@ struct SearchResults: View { var body: some View { Group { + // Conditionally show hidden button to enable down key response when + // search button is shown. + // + // Ideally this functionality should be captured in the standard search + // suggestions widget but the inbuilt UI for this is very narrow and + // the search results very large. if isSearching, searchFocus == nil { Button(action: { searchFocus = viewModel.results.first?.id }, label: {}) -// .opacity(0) + .opacity(0) .keyboardShortcut(.downArrow, modifiers: []) } if zimFiles.isEmpty {