aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-05-09 17:51:17 +0200
committerThomas Citharel <tcit@tcit.fr>2015-05-09 17:51:17 +0200
commit8b90a8157ed6ae6f1a9df53e549963e279c4087e (patch)
tree87d727d51f93d1bd008cea750a76e31cf957d84c /themes
parentfdda9fd9a356b38aad39a4f3703085ce8afc161b (diff)
downloadwallabag-8b90a8157ed6ae6f1a9df53e549963e279c4087e.tar.gz
wallabag-8b90a8157ed6ae6f1a9df53e549963e279c4087e.tar.zst
wallabag-8b90a8157ed6ae6f1a9df53e549963e279c4087e.zip
use keydown instead of keypress for Chrome compatibility
Diffstat (limited to 'themes')
-rw-r--r--themes/_global/js/keyboard.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/themes/_global/js/keyboard.js b/themes/_global/js/keyboard.js
index ec20d3f2..d2a736e4 100644
--- a/themes/_global/js/keyboard.js
+++ b/themes/_global/js/keyboard.js
@@ -1,5 +1,5 @@
1function navigateKeyboard(leftURL, rightURL) { 1function navigateKeyboard(leftURL, rightURL) {
2 window.addEventListener("keypress", function (event) { 2 window.addEventListener("keydown", function (event) {
3 var key = event.which || event.keyCode; // event.keyCode is used for IE8 and earlier versions 3 var key = event.which || event.keyCode; // event.keyCode is used for IE8 and earlier versions
4 switch (key) { 4 switch (key) {
5 case 37: 5 case 37:
@@ -24,4 +24,4 @@ function goRight(rightURL) {
24 if (rightURL != "?view=view&id=") { 24 if (rightURL != "?view=view&id=") {
25 window.location = window.location.origin + window.location.pathname + rightURL; 25 window.location = window.location.origin + window.location.pathname + rightURL;
26 } 26 }
27} \ No newline at end of file 27}