aboutsummaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-08-22 20:13:40 +0200
committerGravatar GitHub <noreply@github.com> 2019-08-22 20:13:40 +0200
commit125a83efc9e6cafb5eb274b07d1d006b0abb3031 (patch)
tree7dc4b88a6ee2a6b612ad45d6ff58bd007f87f8ab /p/scripts
parent6cedeeeae51f5e5220d7f786fb801951811bb743 (diff)
IE11 / Edge keyboard compatibility (#2507)
https://github.com/FreshRSS/FreshRSS/pull/2506#issuecomment-523544684
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/main.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 3f964e70e..3a9d8a52a 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -720,8 +720,14 @@ function init_shortcuts() {
return true;
}
- const s = context.shortcuts,
- k = (ev.key.trim() || ev.code).toUpperCase();
+ const s = context.shortcuts;
+ let k = (ev.key.trim() || ev.code || 'Space').toUpperCase();
+
+ //IE11
+ if (k === 'SPACEBAR') k = 'SPACE';
+ else if (k === 'DEL') k = 'DELETE';
+ else if (k === 'ESC') k = 'ESCAPE';
+
if (location.hash.match(/^#dropdown-/)) {
const n = parseInt(k);
if (n) {