Explorar el Código

파이어폭스에서 단축키 작동 안 하던 문제

잉여개발기 (SPDV) hace 6 años
padre
commit
8edc2c5167
Se han modificado 1 ficheros con 11 adiciones y 9 borrados
  1. 11 9
      views/main_css/js/shotcuts_set.js

+ 11 - 9
views/main_css/js/shotcuts_set.js

@@ -19,13 +19,15 @@ all_list_2 = [
     ['E', '/edit'],
 ];
 
-all_list_2.forEach(function(element) {    
-    shortcut.add(element[0], function() {
-        href_d = window.location.href.split("/");
-        if(href_d[4]) { 
-            window.location.href = element[1] + '/' + href_d[4];
-        }
-    }, {
-        'disable_in_input' : true
+window.onload = function () { 
+    all_list_2.forEach(function(element) {    
+        shortcut.add(element[0], function() {
+            href_d = window.location.href.split("/");
+            if(href_d[4]) { 
+                window.location.href = element[1] + '/' + href_d[4];
+            }
+        }, {
+            'disable_in_input' : true
+        });
     });
-});
+}