File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,7 +83,17 @@ export default defineComponent({
8383 */
8484 supportsLocalSearch() {
8585 // TODO: Make this an API
86- const providerPaths = [' /settings/users' , ' /apps/deck' , ' /settings/apps' ]
86+ const providerPaths = [' /apps/deck' , ' /settings/apps' ]
87+ return providerPaths .some ((path ) => this .currentLocation .pathname ?.includes ?.(path ))
88+ },
89+
90+ /**
91+ * Current page handles the Ctrl+F shortcut itself (e.g. has a dedicated
92+ * search input). UnifiedSearch should stay out of the way on these pages.
93+ */
94+ appHandlesSearchShortcut() {
95+ // TODO: Make this an API
96+ const providerPaths = [' /settings/users' ]
8797 return providerPaths .some ((path ) => this .currentLocation .pathname ?.includes ?.(path ))
8898 },
8999 },
@@ -135,6 +145,10 @@ export default defineComponent({
135145 */
136146 onKeyDown(event : KeyboardEvent ) {
137147 if (event .ctrlKey && event .key === ' f' ) {
148+ // Skip on pages that handle Ctrl+F themselves (e.g. a dedicated search input).
149+ if (this .appHandlesSearchShortcut ) {
150+ return
151+ }
138152 // only handle search if not already open - in this case the browser native search should be used
139153 if (! this .showLocalSearch && ! this .showUnifiedSearch ) {
140154 event .preventDefault ()
You can’t perform that action at this time.
0 commit comments