Bug 233137 - `gestureend` event fired twice for same gesture, occasionally
Summary: `gestureend` event fired twice for same gesture, occasionally
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-15 10:42 PST by Dan
Modified: 2021-11-22 10:43 PST (History)
5 users (show)

See Also:


Attachments
Logger that displays wheel, touch, and gesture events (3.72 KB, text/html)
2021-11-15 10:42 PST, Dan
no flags Details
Video repro (1.51 MB, video/mp4)
2021-11-15 10:45 PST, Dan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan 2021-11-15 10:42:51 PST
Created attachment 444274 [details]
Logger that displays wheel, touch, and gesture events

Occasionally when performing a pinch & twist gestures (that produce, in turn, a scale and a rotation in the emitted gesture events), the `gestureend` event is fired twice for the same gesture.

This goes against the expectation in regards to the order of gesture events (a series of `gesturechange` events bookended by exactly one `gesturestart` and exactly one `gestureend` event). It can also cause problems where the `gestureend` handler is not idempotent, and in the case of applying transformations, the handler is expected not to be.

The bug is elusive, but can hopefully be caught in the attached test file (which I believe is correct, unless I'm missing something obvious). I will also attach the bug repro in video form.
Comment 1 Dan 2021-11-15 10:45:47 PST
Created attachment 444275 [details]
Video repro

While performing a compound gesture (scale + rotate), the `gestureend` event is emitted twice.
Comment 2 Radar WebKit Bug Importer 2021-11-22 10:43:32 PST
<rdar://problem/85680216>