소스 검색

Merge pull request #127 from fouksf/keyboard-shortcuts

Makes keyboard shortcuts active when chat is opened but not focused.
j8
bgrozev 11 년 전
부모
커밋
312b7db6a0
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      keyboard_shortcut.js

+ 2
- 1
keyboard_shortcut.js 파일 보기

@@ -32,7 +32,8 @@ var KeyboardShortcut = (function(my) {
32 32
     };
33 33
 
34 34
     window.onkeyup = function(e) {
35
-        if($("#chatspace").css("display") === "none") {
35
+        if($("#chatspace").css("display") === "none" ||
36
+            !($("#usermsg").is(":focus") || $("#nickinput").is(":focus"))) {
36 37
             var keycode = e.which;
37 38
             if (typeof shortcuts[keycode] === "object") {
38 39
                 shortcuts[keycode].function();

Loading…
취소
저장