From d8227481507837f90fcc42c0b2bfd306be47913b Mon Sep 17 00:00:00 2001 From: fo Date: Fri, 12 Sep 2014 14:42:33 +0300 Subject: [PATCH] Fixes bug with shortcuts enabled when the user is writing in a text field. --- keyboard_shortcut.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboard_shortcut.js b/keyboard_shortcut.js index b9d6acdcd..cffc3fc9e 100644 --- a/keyboard_shortcut.js +++ b/keyboard_shortcut.js @@ -32,8 +32,7 @@ var KeyboardShortcut = (function(my) { }; window.onkeyup = function(e) { - if($("#chatspace").css("display") === "none" || - !($("#usermsg").is(":focus") || $("#nickinput").is(":focus"))) { + if(!($(":focus").is("input[type=text]") || $(":focus").is("textarea"))) { var keycode = e.which; if (typeof shortcuts[keycode] === "object") { shortcuts[keycode].function();