Bug 198560

Summary: [Pointer Events] Fire pointerout and pointerleave events after firing pointercancel
Product: WebKit Reporter: Antoine Quint <graouts>
Component: UI EventsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darryl.noakes, dbates, dino, esprehn+autocc, ews-watchlist, kangil.han, koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Antoine Quint 2019-06-05 04:59:31 PDT
[Pointer Events] Fire pointerout and pointerleave events after firing pointercancel
Comment 1 Antoine Quint 2019-06-05 05:02:30 PDT
Created attachment 371388 [details]
Patch
Comment 2 WebKit Commit Bot 2019-06-05 12:21:44 PDT
Comment on attachment 371388 [details]
Patch

Clearing flags on attachment: 371388

Committed r246122: <https://trac.webkit.org/changeset/246122>
Comment 3 WebKit Commit Bot 2019-06-05 12:21:45 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2019-06-05 12:22:15 PDT
<rdar://problem/51451277>
Comment 5 Darryl Noakes 2023-10-03 12:27:07 PDT
Was this actually released? It is still an issue for me on iOS 15.6.1 and iOS 16.
Comment 6 Chris Dumez 2023-10-03 12:28:06 PDT
(In reply to Darryl Noakes from comment #5)
> Was this actually released? It is still an issue for me on iOS 15.6.1 and
> iOS 16.

That change is already and definitely shipped at some point in the past. If you're still experiencing issues, I recommend filing a new bug.
Comment 7 Darryl Noakes 2023-10-03 12:57:19 PDT
Okay, will do.

I have investigated a little, and it is partially correct when listening for events on the element being manipulated.
However, manipulating a _child_ element does not fire the expected events.
Comment 8 Darryl Noakes 2023-10-03 14:32:23 PDT
To clarify:

When listening for pointer events on an element, Chrome always fires `pointerleave` event on an element when `pointerleave` has been fired on a child element. Safari does this when tapping (as expected, as the pointer has been removed (https://www.w3.org/TR/pointerevents/#the-pointerleave-event)), but not when scrolling.

This may be due to different interpretations of the spec for `pointerleave` (https://www.w3.org/TR/pointerevents/#the-pointerleave-event), with Chrome taking the reasons for firing to include events on child elements and Safari not.

What is the expected behavior for `pointerleave`?

(Sorry for hijacking this thread. I do not currently have access to my test iPhone and so can't submit a proper report yet; if this is even something that needs one.)