Fixes a bug with keyboard shortcuts.
This commit is contained in:
parent
fda411b659
commit
fea751bbb7
|
@ -32,7 +32,7 @@ var KeyboardShortcut = (function(my) {
|
||||||
};
|
};
|
||||||
|
|
||||||
window.onkeyup = function(e) {
|
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;
|
var keycode = e.which;
|
||||||
if (typeof shortcuts[keycode] === "object") {
|
if (typeof shortcuts[keycode] === "object") {
|
||||||
shortcuts[keycode].function();
|
shortcuts[keycode].function();
|
||||||
|
@ -47,7 +47,7 @@ var KeyboardShortcut = (function(my) {
|
||||||
};
|
};
|
||||||
|
|
||||||
window.onkeydown = function(e) {
|
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(e.which === "T".charCodeAt(0)) {
|
||||||
if(isAudioMuted()) {
|
if(isAudioMuted()) {
|
||||||
toggleAudio();
|
toggleAudio();
|
||||||
|
|
Loading…
Reference in New Issue