Skip to content

Commit

Permalink
getModifierState is case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
syranide committed Jul 18, 2014
1 parent e85e5e9 commit 495d866
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/browser/ui/dom/getEventModifierState.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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];
}

Expand Down

0 comments on commit 495d866

Please sign in to comment.