-
Notifications
You must be signed in to change notification settings - Fork 47.8k
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
Cannot preventDefault input[type=number] onWheel event in Chrome #15199
Comments
Hey! You could do it the same way as in the HTML & JS example using the
|
Sure, I’m just reporting the issue with onWheel here. It would be good to be able to use React if I’m using React 😊 |
There should be a flag for passive mode tbh if there isn't already |
This is a duplicate of #14856. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
In Chrome, using
event.preventDefault()
and/orevent.nativeEvent.preventDefault()
withinonWheel
handler of aninput[type=number]
does not prevent number scrolling.https://www.chromestatus.com/features/6662647093133312
React example: https://codesandbox.io/s/00kx423nyl
HTML & JS example for comparison: https://jsbin.com/warerunitu/edit?html,js,output
What is the expected behavior?
I would expect the same behaviour as shown in the HTML & JS example above.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Tested in
[email protected]
,[email protected]
and Chrome v73. I'm unsure if previous versions are affected.The text was updated successfully, but these errors were encountered: