From 3ce7763529174d4fa28ab502859511a1340ce8a2 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Mon, 24 Nov 2014 18:07:05 +0200 Subject: String.charCodeAt is firefox specific --- src/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main.js') 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(); -- cgit v1.3.1