Revision 339f80aa
Von Sven Schöling vor fast 8 Jahren hinzugefügt
js/kivi.ActionBar.js | ||
---|---|---|
41 | 41 |
target = 'document'; |
42 | 42 |
} |
43 | 43 |
|
44 |
var normalized = $.map(keystring.split('+'), function(val, i) { |
|
44 |
var normalized = $.map(String.prototype.split.call(keystring, '+'), function(val, i) { |
|
45 |
console.log(keystring) |
|
45 | 46 |
switch (val) { |
46 | 47 |
case 'ctrl': |
47 | 48 |
case 'alt': return val; |
... | ... | |
49 | 50 |
default: |
50 | 51 |
if (val.length == 1) { |
51 | 52 |
return val.charChodeAt(0) |
52 |
} else if (typeof val === 'number') { |
|
53 |
return val |
|
54 | 53 |
} else if (val % 1 === 0) { |
55 |
return val % 1;
|
|
54 |
return val; |
|
56 | 55 |
} else { |
57 | 56 |
console.log('can not normalize access key token: ' + val); |
58 | 57 |
} |
Auch abrufbar als: Unified diff
ActionBar.js: accesskey normalisierung robuster gemacht