Bug 239014 - [Pointer events] pointerend/pointercancel event never fired when swiping to forwards a page
Summary: [Pointer events] pointerend/pointercancel event never fired when swiping to f...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 15
Hardware: iPhone / iPad iOS 15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-08 13:27 PDT by pfg.webkit
Modified: 2022-04-16 03:36 PDT (History)
5 users (show)

See Also:


Attachments
Pointer swipe bug demo (12.65 MB, video/mov)
2022-04-16 03:26 PDT, Hristiyan Dodov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description pfg.webkit 2022-04-08 13:27:08 PDT
Reproduction:

1. Open this url: https://patrickhlauke.github.io/touch/gesture-touch/pointerevents.html
2. Navigate to any other url
3. Go back
4. Start swiping from the right edge of the screen to go forwards a page
5. Move your finger back to the right edge of the screen to cancel that
6. Notice that a pointerend/pointercancel event is never fired

I would expect a pointercancel event to be fired as soon as the page starts moving for the back/forwards animation, or at least when the finger is lifted, but one is never fired at all causing pages to get stuck expecting more events that never come.
Comment 1 Radar WebKit Bug Importer 2022-04-15 13:28:13 PDT
<rdar://problem/91825957>
Comment 2 Hristiyan Dodov 2022-04-16 03:26:09 PDT
Created attachment 457745 [details]
Pointer swipe bug demo
Comment 3 Hristiyan Dodov 2022-04-16 03:36:40 PDT
I can reproduce this issue on iPhone 12 mini, OS version 15.4.1.

Reproduction site:
https://safari-pointer-swipe-bug.netlify.app/

I've also attached a video that showcases the bug:
- Swiping from the left (go to previous page) correctly triggers `pointerdown`, then `pointerup` events.
- Swiping from the right (go to next page) correctly triggers `pointerdown`, but **incorrectly** does not trigger `pointerup` afterwards.

The OP expects `pointercancel` to be fired, but that would introduce an inconsistency with swiping from the left. It should be a `pointerup` event.