Fixes bug with shortcuts enabled when the user is writing in a text field.
This commit is contained in:
parent
092e8df148
commit
d822748150
|
@ -32,8 +32,7 @@ var KeyboardShortcut = (function(my) {
|
||||||
};
|
};
|
||||||
|
|
||||||
window.onkeyup = function(e) {
|
window.onkeyup = function(e) {
|
||||||
if($("#chatspace").css("display") === "none" ||
|
if(!($(":focus").is("input[type=text]") || $(":focus").is("textarea"))) {
|
||||||
!($("#usermsg").is(":focus") || $("#nickinput").is(":focus"))) {
|
|
||||||
var keycode = e.which;
|
var keycode = e.which;
|
||||||
if (typeof shortcuts[keycode] === "object") {
|
if (typeof shortcuts[keycode] === "object") {
|
||||||
shortcuts[keycode].function();
|
shortcuts[keycode].function();
|
||||||
|
|
Loading…
Reference in New Issue