diff options
| author | Alon Levy <alon@pobox.com> | 2014-11-24 18:07:05 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-11-24 18:07:05 +0200 |
| commit | 3ce7763529174d4fa28ab502859511a1340ce8a2 (patch) | |
| tree | b00e0ff73555795f8abe3cecbe190758f2273a1d /src | |
| parent | cc211254c511b88e8171069e5c8122d53229cd51 (diff) | |
String.charCodeAt is firefox specific
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.js b/src/main.js index f9d830e9..b4f71001 100644 --- a/src/main.js +++ b/src/main.js @@ -33,8 +33,8 @@ function(textanalysis_ui, textanalysis, buttons, history, drag_n_drop, } document.body.onkeyup = function(e) { - var key = (e.key || (e.charCode && String.charCodeAt(e.charCode)) - || (e.which && String.charCodeAt(e.which))).toLowerCase(); + var key = (e.key || (e.charCode && String.fromCharCode(e.charCode)) + || (e.which && String.fromCharCode(e.which))).toLowerCase(); if (e.altKey && e.ctrlKey && key == 'i') { $('#textanalyser').focus(); |
