Bug 233432 - [Pointer Events] pointerout event is fired after any pointerup event when pointer capture is set
Summary: [Pointer Events] pointerout event is fired after any pointerup event when poi...
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-22 13:51 PST by polygonalsun
Modified: 2021-11-27 10:54 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>