Bug 149526 - Wheel event triggered only once per touchpad touch
Summary: Wheel event triggered only once per touchpad touch
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 10
Hardware: Mac OS X 10.11
: P2 Critical
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-09-24 09:28 PDT by Michał Gołębiowski-Owczarek
Modified: 2020-05-24 12:10 PDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Gołębiowski-Owczarek 2015-09-24 09:28:33 PDT
Open http://output.jsbin.com/mimiqi/ in Safari 9 and scroll using a MacBook touchpad. The counter at the top left shows how many times the wheel event is fired. In all browsers except Safari 9 (i.e. Chrome, Firefox, **even Safari 8**) the event is fired once per animation frame. Safari 9 USUALLY fires it only once per touching the touchpad, although sometimes it switches into once-per-frame mode (scroll a little in various directions and you should see it).

This will break many interactions that depend on wheel happening in every animation frame to provide a custom scroll-like UI.

Note that I can't reproduce this new broken behavior on JSFiddle which may mean it doesn't happen in iframes (the test case is identical): http://jsfiddle.net/eoxzpqn5/

Is there any chance of this getting fixed in Safari 9? Seems pretty severe to me. :(
Comment 1 Michał Gołębiowski-Owczarek 2015-09-24 09:37:14 PDT
If this matters, I'm testing on a mid-2012 non-retina MacBook Pro. OS X 10.11 (15A282a).
Comment 2 Radar WebKit Bug Importer 2015-09-24 19:06:05 PDT
<rdar://problem/22851046>
Comment 3 Berkay Sargin 2015-10-02 00:29:50 PDT
same issue here, for my case custom-scrolling solution won't work in safari 9 it was working with safari 8.(and others)
Comment 4 Berkay Sargin 2015-10-02 00:31:39 PDT
btw magic mouse is the same also.
Comment 5 Michał Gołębiowski-Owczarek 2016-04-04 13:26:24 PDT
Has this been fixed? My test case seems to no longer be broken in Safari 9.1, at least I can't reproduce it anymore; I've changed the MacBook from the last time I tried the test case so I can't be sure it didn't change something.
Comment 6 Michał Gołębiowski-Owczarek 2016-04-04 13:29:34 PDT
Sorry, false alarm, I tried on the wrong browser. The bug is still there. :(
Comment 7 Simon Fraser (smfr) 2016-04-07 17:43:58 PDT
This happens because EventDispatcher::wheelEvent() sends the event to the scrolling tree, which claims to handle it (by doing fast scrolling), so we never end up in the event dispatching code.

What should really happen here is that we make the whole page be a slow event region.
Comment 8 Simon Fraser (smfr) 2016-04-07 17:50:16 PDT
Ah, we have a correct non-fast scrollable region, but we return early from ScrollingTree::shouldHandleWheelEventSynchronously() because of latching logic.
Comment 9 Michał Gołębiowski-Owczarek 2016-06-05 04:24:41 PDT
We had to add a note about this Safari bug to jquery-mousewheel because of multiple reports about it:
https://github.com/jquery/jquery-mousewheel/commit/18e3cc17657237220c4dbd68a3fe4f6abdbf7ef8

Please fix it, the jquery-mousewheel plugin is quite popular so a lot of people are affected.

I really wish issues like that were given higher priority.
Comment 10 Gregor Adams 2016-09-23 03:13:56 PDT
The bug has not been fixed in Safari 10, probably not even addressed.

I think Apple should start working on this since it is a real showstopper.

Showstopper: "a feature is entirely broken and causes issues on many platforms"
Comment 11 blanchette 2017-06-06 13:00:32 PDT
We are also running into this problem and it's certainly a show stopper bug for us.
The WebKit team NEEDS to address this, there isn't even anybody assigned to it.

This is clearly reproducible and is causing issues for many users, whats the deal?
Comment 12 Guido Bouman 2018-05-04 02:42:09 PDT
Your best chance of gathering attention to this ticket is by everyone reporting a bug through Apple's official bug reporting program: https://bugreport.apple.com/

I've submitted one this morning.
Comment 13 Simon Fraser (smfr) 2020-05-24 12:10:39 PDT
I fixed this in https://trac.webkit.org/changeset/261427/webkit