Bladeren bron

Fixes a bug with keyboard shortcuts.

master
fo 11 jaren geleden
bovenliggende
commit
fea751bbb7
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2
    2
      keyboard_shortcut.js

+ 2
- 2
keyboard_shortcut.js Bestand weergeven

32
     };
32
     };
33
 
33
 
34
     window.onkeyup = function(e) {
34
     window.onkeyup = function(e) {
35
-        if(!($(":focus").is("input[type=text]") || $(":focus").is("textarea"))) {
35
+        if(!($(":focus").is("input[type=text]") || $(":focus").is("input[type=password]") || $(":focus").is("textarea"))) {
36
             var keycode = e.which;
36
             var keycode = e.which;
37
             if (typeof shortcuts[keycode] === "object") {
37
             if (typeof shortcuts[keycode] === "object") {
38
                 shortcuts[keycode].function();
38
                 shortcuts[keycode].function();
47
     };
47
     };
48
 
48
 
49
     window.onkeydown = function(e) {
49
     window.onkeydown = function(e) {
50
-        if(!($(":focus").is("input[type=text]") || $(":focus").is("textarea"))) {
50
+        if(!($(":focus").is("input[type=text]") || $(":focus").is("input[type=password]") || $(":focus").is("textarea"))) {
51
             if(e.which === "T".charCodeAt(0)) {
51
             if(e.which === "T".charCodeAt(0)) {
52
                 if(isAudioMuted()) {
52
                 if(isAudioMuted()) {
53
                     toggleAudio();
53
                     toggleAudio();

Laden…
Annuleren
Opslaan