Skip to content

Commit 495d866

Browse files
committed
getModifierState is case sensitive
1 parent e85e5e9 commit 495d866

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/browser/ui/dom/getEventModifierState.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
*/
2626

2727
var modifierKeyToProp = {
28-
'alt': 'altKey',
29-
'control': 'ctrlKey',
30-
'meta': 'metaKey',
31-
'shift': 'shiftKey'
28+
'Alt': 'altKey',
29+
'Control': 'ctrlKey',
30+
'Meta': 'metaKey',
31+
'Shift': 'shiftKey'
3232
};
3333

3434
// IE8 does not implement getModifierState so we simply map it to the only
@@ -41,7 +41,7 @@ function modifierStateGetter(keyArg) {
4141
if (nativeEvent.getModifierState) {
4242
return nativeEvent.getModifierState(keyArg);
4343
}
44-
var keyProp = modifierKeyToProp[keyArg.toLowerCase()];
44+
var keyProp = modifierKeyToProp[keyArg];
4545
return keyProp && nativeEvent[keyProp];
4646
}
4747

0 commit comments

Comments
 (0)