'Prevent Default' has no effect on the 'onWheel' event

Hi there, I'm trying to implement zooming with mousewheel on a component. This works fine, except for the fact that the whole page scrolls with it. The "prevent default" option ought to disable that behavior, but that option does not work for this event.

Calling 'preventDefault()' on a 'wheel' event from a listener registered as 'passive' was ignored. react-dom-18.2.0.js:51:314

Is there some way to work around this?

I don't know why you didn't get a response. This is an annoying issue.

I've just come across this trying to prevent the numeric input field from incrementing/decrementing on mouse wheel event.

The problem is that the event is added as passive by default and passive events can't prevent default.

If the user sets the "Prevent Default" option in the event dialogue, the event handler should be added with the third parameter as { passive: false }

The same is true for touch start and touch move.

This is a bug IMO.

Have either of you opened a support ticket to report this bug? IA doesn't dedicate eyes over here to do that for bug reports.