Closed ghost closed 8 years ago
The fun part of web development is that safari, opera, chrome, firefox were made to normalize at -1/1 to match native initially, somewhere along the road. They have changed since (including the actual wheel event itself), but we'll make it consistent.
There are other things to consider too, like natural scroll direction in OSX (especially on web) as it doesn't (at least not before) change the delta values. This might also be a difference you'll see.
These are the two main issues with the mousewheel event:
At the very least, the sign/direction of the mouse wheel event should be consistent across all platforms. I wouldn't worry so much about the actual value, it probably isn't worth it to try and make that consistent.
However, on web, the current implementation divides the deltaX/Y by 16, which on firefox rounds to 0. chrome and firefox have different units (see WheelEvent.deltaMode on MDN), so the solution is either to pass the deltaX/Y values unmodified, or to attempt to compensate for the deltaMode.