Don't activate search for keys with modifiers

This commit is contained in:
Sashko Stubailo
2014-12-05 16:04:51 -08:00
parent 10bdd78c4c
commit a7ec4df4da

View File

@@ -19,7 +19,9 @@ $(document).on("keydown", function (event) {
var doNotOpenSearch = [13, 27, 32];
$(document).on("keypress", function (event) {
if (event.which && (! _.contains(doNotOpenSearch, event.which))) {
// Don't activate search for special keys or keys with modifiers
if (event.which && (! _.contains(doNotOpenSearch, event.which)) &&
(! event.ctrlKey) && (! event.metaKey)) {
if (! Session.get("searchOpen")) {
Session.set("searchOpen", true);