-
Notifications
You must be signed in to change notification settings - Fork 47.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyboardEvent.repeat is not normalized #13411
Comments
@gaearon given that the documentation suggests this works but it does not, this seems like a bug not a feature request, no? |
@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. |
@gaearon gotcha. Just to be clear though this is not just IE, also Edge and Safari <10.1. I think that’s a more significant surface area, although not sure what your browser support policy for non-IE is. |
We'll need to look at what normalization would involve. If it's not a lot of code I think we can do it. |
#13104 seems somewhat related -- another field to be normalized (although that one is a bit simpler). |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
Do 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-eventsIE11/Edge do not natively support
repeat
, but React does not normalize the event to setrepeat: 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.The text was updated successfully, but these errors were encountered: