@samitouri / QOS-React-2 / commits / 495d866a66

getModifierState is case sensitive

Andreas Svensson committed Jul 18, 2014 at 18:24 UTC 495d866a66d856d599fc79613ff488b60fd2e0b4
1 file changed +5 -5
src/browser/ui/dom/getEventModifierState.js
+5 -5
@@ -25,10 +25,10 @@
25 */
26
27 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'
32 };
33
34 // IE8 does not implement getModifierState so we simply map it to the only
@@ -41,7 +41,7 @@ function modifierStateGetter(keyArg) {
41 if (nativeEvent.getModifierState) {
42 return nativeEvent.getModifierState(keyArg);
43 }
44 - var keyProp = modifierKeyToProp[keyArg.toLowerCase()];
44 + var keyProp = modifierKeyToProp[keyArg];
45 return keyProp && nativeEvent[keyProp];
46 }
47