diff options
author | Hendrik Leppelsack <hendrik@leppelsack.de> | 2015-11-24 14:46:54 +0100 |
---|---|---|
committer | Hendrik Leppelsack <hendrik@leppelsack.de> | 2015-11-24 15:01:20 +0100 |
commit | f1b0bf069693344d6bf9d3bf27d81b56cb67d890 (patch) | |
tree | 18bef127e699022ef8a3da49cffabda006f93260 /core/search | |
parent | 089cd56e00fff6a664d10710e95ffccf6762f12f (diff) | |
download | nextcloud-server-f1b0bf069693344d6bf9d3bf27d81b56cb67d890.tar.gz nextcloud-server-f1b0bf069693344d6bf9d3bf27d81b56cb67d890.zip |
add search fallback to browser
Diffstat (limited to 'core/search')
-rw-r--r-- | core/search/js/search.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/search/js/search.js b/core/search/js/search.js index 92cf034cf7d..ef99cf7e961 100644 --- a/core/search/js/search.js +++ b/core/search/js/search.js @@ -344,7 +344,12 @@ }); $(document).keydown(function(event) { - if ((event.ctrlKey || event.metaKey) && !event.shiftKey && event.keyCode === 70) { // Ctrl+F + if ((event.ctrlKey || event.metaKey) && // Ctrl or Command (OSX) + !event.shiftKey && + event.keyCode === 70 && // F + self.hasFilter(getCurrentApp()) && // Search is enabled + !$searchBox.is(':focus') // if searchbox is already focused do nothing (fallback to browser default) + ) { $searchBox.focus(); event.preventDefault(); } |