diff options
author | Hendrik Leppelsack <hendrik@leppelsack.de> | 2015-09-21 11:01:19 +0200 |
---|---|---|
committer | Hendrik Leppelsack <hendrik@leppelsack.de> | 2015-11-12 12:37:31 +0100 |
commit | 089cd56e00fff6a664d10710e95ffccf6762f12f (patch) | |
tree | a71cc41be78a0a6f4b45547b9e76d92b94e78dcf /core/search | |
parent | 24793634924abe13c68061027462285bece2eb4c (diff) | |
download | nextcloud-server-089cd56e00fff6a664d10710e95ffccf6762f12f.tar.gz nextcloud-server-089cd56e00fff6a664d10710e95ffccf6762f12f.zip |
add Ctrl+F shortcut for the search bar
Diffstat (limited to 'core/search')
-rw-r--r-- | core/search/js/search.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/search/js/search.js b/core/search/js/search.js index 4e83a070170..92cf034cf7d 100644 --- a/core/search/js/search.js +++ b/core/search/js/search.js @@ -343,6 +343,13 @@ } }); + $(document).keydown(function(event) { + if ((event.ctrlKey || event.metaKey) && !event.shiftKey && event.keyCode === 70) { // Ctrl+F + $searchBox.focus(); + event.preventDefault(); + } + }); + $searchResults.on('click', 'tr.result', function (event) { var $row = $(this); var item = $row.data('result'); |