Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: call a DX event after using an HTML draggable element (T1260277) #28541

Draft
wants to merge 3 commits into
base: 24_2
Choose a base branch
from

Conversation

chaosmirage
Copy link

@chaosmirage chaosmirage commented Dec 12, 2024

An HTML draggable element triggers the pointercancel event after the dragstart event, as specified in the standards. However, this behavior was not handled by the events engine, leading to an endless event stream.

The user agent MUST fire a pointer event named pointercancel when it detects a scenario to suppress a pointer event stream.

https://www.w3.org/TR/pointerevents/#the-pointercancel-event

The user agent MUST suppress a pointer event stream when it detects that a pointer is unlikely to continue to produce events. Any of the following scenarios satisfy this condition (there MAY be additional scenarios):
[...]
As part of the drag operation initiation algorithm as defined in the drag and drop processing model [HTML], for the pointer that caused the drag operation.

https://www.w3.org/TR/pointerevents/#suppressing-a-pointer-event-stream

It seems this behavior was first introduced in the specification in 2018, as noted in the Pointer Events Level 2 Working Draft.

Safari still has a related issue.

@chaosmirage chaosmirage force-pushed the fix/events branch 3 times, most recently from f4f5a40 to fd719c9 Compare December 13, 2024 13:48
@chaosmirage chaosmirage changed the title fix: call a DX event after using an HTML draggable element. fix: call a DX event after using an HTML draggable element (T1260277) Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant