diff options
| author | Alon Levy <alon@pobox.com> | 2015-02-16 22:29:09 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-02-17 11:27:11 +0200 |
| commit | b845d3031496e8e523f3e95ada7d98572423a49e (patch) | |
| tree | 42867a328ddbf49c210eafc43784ccceabb509b5 | |
| parent | 5a3b9b69b82d5fb00ebd414489eb053ec82ad0dd (diff) | |
client/main: possible bug fix seen on LightTable/webkit - not critical
| -rw-r--r-- | src/client/main.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/main.js b/src/client/main.js index e4b5b099..0c1b4c98 100644 --- a/src/client/main.js +++ b/src/client/main.js @@ -32,8 +32,9 @@ function(textanalysis_ui, textanalysis, buttons, history, drag_n_drop, } document.body.onkeyup = function(e) { - var key = (e.key || (e.charCode && String.fromCharCode(e.charCode)) - || (e.which && String.fromCharCode(e.which))).toLowerCase(); + var key = ((e.key && String(e.key)) + || (e.charCode && String.fromCharCode(e.charCode)) + || (e.which && String.fromCharCode(e.which))).toLowerCase(); if (e.altKey && e.ctrlKey && key == 'i') { $('#textanalyser').focus(); |
