add search fallback to browser

This commit is contained in:
Hendrik Leppelsack 2015-11-24 14:46:54 +01:00
parent 089cd56e00
commit f1b0bf0696

View file

@ -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();
}