mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #48861 from nextcloud/backport/48850/stable30
This commit is contained in:
commit
5c460f23ae
3 changed files with 10 additions and 7 deletions
|
|
@ -97,7 +97,9 @@ export default defineComponent({
|
|||
|
||||
mounted() {
|
||||
// register keyboard listener for search shortcut
|
||||
window.addEventListener('keydown', this.onKeyDown)
|
||||
if (window.OCP.Accessibility.disableKeyboardShortcuts() === false) {
|
||||
window.addEventListener('keydown', this.onKeyDown)
|
||||
}
|
||||
|
||||
// Allow external reset of the search / close local search
|
||||
subscribe('nextcloud:unified-search:reset', () => {
|
||||
|
|
@ -131,9 +133,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()
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -142,9 +144,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
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
4
dist/core-unified-search.js
vendored
4
dist/core-unified-search.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-unified-search.js.map
vendored
2
dist/core-unified-search.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue