React Events: support legacy browser Spacebar key value (#15766)
Nicolas Gallagher committed
May 29, 2019 at 15:00 UTC
2670bc34006571cc08b430ca6349be8d1d8db1ba
1 file changed
+2
-1
packages/react-events/src/Press.js
+2
-1
@@ -414,7 +414,8 @@ function dispatchCancel(
414
415
function isValidKeyPress(key: string): boolean {
416
// Accessibility for keyboards. Space and Enter only.
417
- return key === ' ' || key === 'Enter';
417
+ // "Spacebar" is for IE 11
418
+ return key === 'Enter' || key === ' ' || key === 'Spacebar';
419
}
420
421
function calculateDelayMS(delay: ?number, min = 0, fallback = 0) {