Check nothing is focused for search hotkey

This commit is contained in:
Hillel Coren 2016-02-26 00:07:48 +02:00
parent 308e5a1656
commit df203c2e5e

View File

@ -354,7 +354,7 @@
// Focus the search input if the user clicks forward slash // Focus the search input if the user clicks forward slash
$('body').keypress(function(event) { $('body').keypress(function(event) {
if (event.which == 47) { if (event.which == 47 && !$('*:focus').length) {
event.preventDefault(); event.preventDefault();
showSearch(); showSearch();
} }