Bug 222632

Summary: pointercancel event not fired on drag start
Product: WebKit Reporter: Devon Govett <govett>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: darryl.noakes, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Unspecified   
OS: macOS 10.15   
See Also: https://bugs.webkit.org/show_bug.cgi?id=194173

Description Devon Govett 2021-03-02 16:07:08 PST
The pointercancel event should be fired when starting a drag on an element with `draggable="true"`. This is made explicit in the spec: https://www.w3.org/TR/pointerevents2/#the-pointercancel-event and Firefox and Chrome behave this way. Safari on macOS does not.

Steps to reproduce:

1. Open https://codepen.io/devongovett/pen/MWbXYgR in Safari on macOS.
2. Mouse down on the button. Notice that it turns red due to pointerdown being fired.
3. Drag the button. Notice that it stays red due to pointercancel not being fired.
4. Open the example in Chrome and Firefox and perform the above steps. Notice that the button turns green on drag due to pointercancel being fired.

The behavior also appears to be correct in Safari on iOS.
Comment 1 Radar WebKit Bug Importer 2021-03-09 16:08:20 PST
<rdar://problem/75239775>