summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Leppelsack <hendrik@leppelsack.de>2015-09-21 11:01:19 +0200
committerHendrik Leppelsack <hendrik@leppelsack.de>2015-11-12 12:37:31 +0100
commit089cd56e00fff6a664d10710e95ffccf6762f12f (patch)
treea71cc41be78a0a6f4b45547b9e76d92b94e78dcf
parent24793634924abe13c68061027462285bece2eb4c (diff)
downloadnextcloud-server-089cd56e00fff6a664d10710e95ffccf6762f12f.tar.gz
nextcloud-server-089cd56e00fff6a664d10710e95ffccf6762f12f.zip
add Ctrl+F shortcut for the search bar
-rw-r--r--core/search/js/search.js7
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');