]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(unified-search): Close on second ctrl+f
authorFerdinand Thiessen <opensource@fthiessen.de>
Wed, 23 Oct 2024 10:49:33 +0000 (12:49 +0200)
committerFerdinand Thiessen <opensource@fthiessen.de>
Wed, 23 Oct 2024 11:01:28 +0000 (13:01 +0200)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
core/src/views/UnifiedSearch.vue

index 7ce17afbad75db873322209766ff6bb8019aeaaf..edc1849e62fe4b7962227b8d889da82847e3639b 100644 (file)
@@ -138,9 +138,9 @@ export default defineComponent({
                        if (event.ctrlKey && event.code === 'KeyF') {
                                // only handle search if not already open - in this case the browser native search should be used
                                if (!this.showLocalSearch && !this.showUnifiedSearch) {
-                                       this.toggleUnifiedSearch()
                                        event.preventDefault()
                                }
+                               this.toggleUnifiedSearch()
                        }
                },
 
@@ -149,9 +149,10 @@ export default defineComponent({
                 */
                toggleUnifiedSearch() {
                        if (this.supportsLocalSearch) {
-                               this.showLocalSearch = true
+                               this.showLocalSearch = !this.showLocalSearch
                        } else {
-                               this.openModal()
+                               this.showUnifiedSearch = !this.showUnifiedSearch
+                               this.showLocalSearch = false
                        }
                },