getModifierState is case sensitive
This commit is contained in:
parent
e85e5e9952
commit
495d866a66
|
@ -25,10 +25,10 @@
|
|||
*/
|
||||
|
||||
var modifierKeyToProp = {
|
||||
'alt': 'altKey',
|
||||
'control': 'ctrlKey',
|
||||
'meta': 'metaKey',
|
||||
'shift': 'shiftKey'
|
||||
'Alt': 'altKey',
|
||||
'Control': 'ctrlKey',
|
||||
'Meta': 'metaKey',
|
||||
'Shift': 'shiftKey'
|
||||
};
|
||||
|
||||
// IE8 does not implement getModifierState so we simply map it to the only
|
||||
|
@ -41,7 +41,7 @@ function modifierStateGetter(keyArg) {
|
|||
if (nativeEvent.getModifierState) {
|
||||
return nativeEvent.getModifierState(keyArg);
|
||||
}
|
||||
var keyProp = modifierKeyToProp[keyArg.toLowerCase()];
|
||||
var keyProp = modifierKeyToProp[keyArg];
|
||||
return keyProp && nativeEvent[keyProp];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue