mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
React Events: support legacy browser Spacebar key value (#15766)
This commit is contained in:
1 parent
9aad17d60c
commit
2670bc3400
1 file changed
+2
-1
Vendored
+2
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user