[webkit-dev] Mouse wheel event precision

Andy Estes aestes at apple.com
Wed Jun 9 00:25:54 PDT 2010


On Jun 8, 2010, at 8:34 PM, Nathan Vander Wilt wrote:

> What Safari 4 seemed to do was simply provide much greater precision, where scrolling half a line simply yielded about 20 units instead of being ignored. So the above code would yield integral deltas in browsers that only fired events in 3-line increments, but nice fractional deltas in WebKit.

Some sites choose to completely ignore wheel deltas less than 120.  On devices like trackpads where a slow but continuous scrolling gesture tends to result in a series of small, non-cumulative mousewheel events, the old behavior caused these gestures to be completely ignored.  Yahoo! Mail was one such site where the small fractional values caused compatibility issues.

> What Safari 5's WebKit does is turn one "line" into 4800 (!) units instead of 40.

This could be plausible on a trackpad that scales the wheelDelta based on gesture velocity, although I'd expect a value of 120 for each tick of a conventional wheel mouse.  As Peter said, if you have a test case where Safari disagrees with IE on Windows or Chrome on either platform, please file a bug and we'll investigate.

Thanks,
Andy


More information about the webkit-dev mailing list