From f1b0bf069693344d6bf9d3bf27d81b56cb67d890 Mon Sep 17 00:00:00 2001 From: Hendrik Leppelsack Date: Tue, 24 Nov 2015 14:46:54 +0100 Subject: [PATCH] add search fallback to browser --- core/search/js/search.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/search/js/search.js b/core/search/js/search.js index 92cf034cf7..ef99cf7e96 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(); }