Bug 233432

Summary: [Pointer Events] pointerout event is fired after any pointerup event when pointer capture is set
Product: WebKit Reporter: polygonalsun
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: graouts, hi, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Unspecified   
OS: Unspecified   

Description polygonalsun 2021-11-22 13:51:12 PST
pointerout elements are being fired erroneously when a pointerup event occurs, while pointer capture has been set.  While they will fire, as expected, when leaving the confines of an HTMLElement, they will also fire if pointer capture is set before a pointer button is released.

JSFiddle repro: https://jsfiddle.net/81L3fbsv/ (Run and just click in the canvas area)

Repro:
1. Create canvas HTMLElement
2. Add event listener for "pointerdown" to set pointer capture
3. Add event listener for "pointerout" to do something like print to the console
4. Click in the canvas area without exiting it

Expected behavior: Nothing should happen

Actual behavior: When the pointer button is released, the contents of the "pointerout" callback is run (eg. message is printed to log)
Comment 1 Radar WebKit Bug Importer 2021-11-27 10:54:23 PST
<rdar://problem/85780867>