From ea6e031e042f6de39687cc8c4f271f931c978bbc Mon Sep 17 00:00:00 2001 From: Peter Ringelmann Date: Thu, 16 Apr 2026 14:43:48 +0200 Subject: [PATCH] fix(core): skip unified-search Ctrl+F on pages with their own handler -e Signed-off-by: Peter Ringelmann --- core/src/views/UnifiedSearch.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/core/src/views/UnifiedSearch.vue b/core/src/views/UnifiedSearch.vue index f29b891bc0e..f0e4ec649de 100644 --- a/core/src/views/UnifiedSearch.vue +++ b/core/src/views/UnifiedSearch.vue @@ -83,7 +83,17 @@ export default defineComponent({ */ supportsLocalSearch() { // TODO: Make this an API - const providerPaths = ['/settings/users', '/apps/deck', '/settings/apps'] + const providerPaths = ['/apps/deck', '/settings/apps'] + return providerPaths.some((path) => this.currentLocation.pathname?.includes?.(path)) + }, + + /** + * Current page handles the Ctrl+F shortcut itself (e.g. has a dedicated + * search input). UnifiedSearch should stay out of the way on these pages. + */ + appHandlesSearchShortcut() { + // TODO: Make this an API + const providerPaths = ['/settings/users'] return providerPaths.some((path) => this.currentLocation.pathname?.includes?.(path)) }, }, @@ -135,6 +145,10 @@ export default defineComponent({ */ onKeyDown(event: KeyboardEvent) { if (event.ctrlKey && event.key === 'f') { + // Skip on pages that handle Ctrl+F themselves (e.g. a dedicated search input). + if (this.appHandlesSearchShortcut) { + return + } // only handle search if not already open - in this case the browser native search should be used if (!this.showLocalSearch && !this.showUnifiedSearch) { event.preventDefault()