KeyboardEvent.repeat is not normalized
See original GitHub issueDo you want to request a feature or report a bug? Bug
What is the current behavior? Documentation of SyntheticEvent claims: “React normalizes events so that they have consistent properties across different browsers.” https://reactjs.org/docs/events.html#supported-events
Documentation of Keyboard Events lists boolean repeat
as a supported field: https://reactjs.org/docs/events.html#keyboard-events
IE11/Edge do not natively support repeat
, but React does not normalize the event to set repeat: true
when a keyDown event repeats (i.e. when a key is held down). (Edge has an open bug on this but of course IE11 is abandonware.)
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Tab to to the only div in this repro and hold down a key: https://jsfiddle.net/acsr4ofu/
Bug: ‘repeat!’ alert does not appear in IE11
What is the expected behavior? An alert dialog showing ‘repeat!’ should appear in any browser that React supports.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Current version of React, any browser which does not natively support KeyboardEvent.repeat
but IE/Edge in particular (Chrome always supported; FF since 28; Safari since 10.1). Unknown if this worked in previous versions of React.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
@craigkovatch I see where you’re coming from but given the pressure to reduce React bundle size the bar for polyfilling something (especially just for IE) is really high. Technically it’s missing functionality so I tagged as “feature request”. If the fix is small we can get it in, but if it’s complicated then it’s more likely we’ll amend the docs. This needs more investigation into the fix itself.
We’ll need to look at what normalization would involve. If it’s not a lot of code I think we can do it.