Skip to content

Cannot preventDefault input[type=number] onWheel event in Chrome #15199

Closed
@jjenzz

Description

@jjenzz

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

In Chrome, using event.preventDefault() and/or event.nativeEvent.preventDefault() within onWheel handler of an input[type=number] does not prevent number scrolling.

image
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 react@16.8.5, react-dom@16.8.5 and Chrome v73. I'm unsure if previous versions are affected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions