React Events: support legacy browser Spacebar key value (#15766)

This commit is contained in:
Nicolas Gallagher authored and GitHub committed 2019-05-29 15:00:43 -07:00
1 parent 9aad17d60c
commit 2670bc3400
1 file changed
+2 -1
+2 -1
View File
@@ -414,7 +414,8 @@ function dispatchCancel(
function isValidKeyPress(key: string): boolean {
// Accessibility for keyboards. Space and Enter only.
return key === ' ' || key === 'Enter';
// "Spacebar" is for IE 11
return key === 'Enter' || key === ' ' || key === 'Spacebar';
}
function calculateDelayMS(delay: ?number, min = 0, fallback = 0) {