]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
use keydown instead of keypress for Chrome compatibility
authorThomas Citharel <tcit@tcit.fr>
Sat, 9 May 2015 15:51:17 +0000 (17:51 +0200)
committerThomas Citharel <tcit@tcit.fr>
Sat, 9 May 2015 15:51:17 +0000 (17:51 +0200)
themes/_global/js/keyboard.js

index ec20d3f2477f984dbe5a17a5c22dcac996c21ceb..d2a736e4190074289454d8a7c4f49a4e93a796d8 100644 (file)
@@ -1,5 +1,5 @@
 function navigateKeyboard(leftURL, rightURL) {
-  window.addEventListener("keypress", function (event) {
+  window.addEventListener("keydown", function (event) {
     var key = event.which || event.keyCode; // event.keyCode is used for IE8 and earlier versions
     switch (key) {
       case 37:
@@ -24,4 +24,4 @@ function goRight(rightURL) {
   if (rightURL != "?view=view&id=") {
         window.location = window.location.origin + window.location.pathname + rightURL;
   }
-}
\ No newline at end of file
+}