From fea751bbb752b731c690d3085ad193dd060ee4db Mon Sep 17 00:00:00 2001 From: fo Date: Fri, 3 Oct 2014 15:21:48 +0300 Subject: [PATCH] Fixes a bug with keyboard shortcuts. --- keyboard_shortcut.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard_shortcut.js b/keyboard_shortcut.js index eb1656608..3e6b07c0a 100644 --- a/keyboard_shortcut.js +++ b/keyboard_shortcut.js @@ -32,7 +32,7 @@ var KeyboardShortcut = (function(my) { }; window.onkeyup = function(e) { - if(!($(":focus").is("input[type=text]") || $(":focus").is("textarea"))) { + if(!($(":focus").is("input[type=text]") || $(":focus").is("input[type=password]") || $(":focus").is("textarea"))) { var keycode = e.which; if (typeof shortcuts[keycode] === "object") { shortcuts[keycode].function(); @@ -47,7 +47,7 @@ var KeyboardShortcut = (function(my) { }; window.onkeydown = function(e) { - if(!($(":focus").is("input[type=text]") || $(":focus").is("textarea"))) { + if(!($(":focus").is("input[type=text]") || $(":focus").is("input[type=password]") || $(":focus").is("textarea"))) { if(e.which === "T".charCodeAt(0)) { if(isAudioMuted()) { toggleAudio();