From: Sven Schöling Date: Thu, 27 Oct 2016 15:54:14 +0000 (+0200) Subject: ActionBar.js: accesskey normalisierung robuster gemacht X-Git-Tag: release-3.5.4~1380 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=339f80aa723d584e29fe42f5307d435d5c6a8cc8;p=kivitendo-erp.git ActionBar.js: accesskey normalisierung robuster gemacht --- diff --git a/js/kivi.ActionBar.js b/js/kivi.ActionBar.js index f6f0059d9..597b48528 100644 --- a/js/kivi.ActionBar.js +++ b/js/kivi.ActionBar.js @@ -41,7 +41,8 @@ namespace('kivi', function(k){ target = 'document'; } - var normalized = $.map(keystring.split('+'), function(val, i) { + var normalized = $.map(String.prototype.split.call(keystring, '+'), function(val, i) { + console.log(keystring) switch (val) { case 'ctrl': case 'alt': return val; @@ -49,10 +50,8 @@ namespace('kivi', function(k){ default: if (val.length == 1) { return val.charChodeAt(0) - } else if (typeof val === 'number') { - return val } else if (val % 1 === 0) { - return val % 1; + return val; } else { console.log('can not normalize access key token: ' + val); }