From 8b90a8157ed6ae6f1a9df53e549963e279c4087e Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 9 May 2015 17:51:17 +0200 Subject: use keydown instead of keypress for Chrome compatibility --- themes/_global/js/keyboard.js | 4 ++-- 1 file 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 @@ 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 +} -- cgit v1.2.3