Drag-n-drop: Implementations do not stop firing drag events if event canceled

Open
#5,201 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
html
Domain
web-dev

Research direction

Start with the linked Chromium issue and the HTML drag-and-drop requirements quoted in this report. Compare the documented cancellation behavior with the reported Chrome, Firefox, and Safari behavior; the work is done when the issue's browser behavior and the appropriate specification outcome are resolved.

Written by the indexing model from the issue text.

Description

compat topic: drag and drop

Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1027857

The bug repro waits for a drag to be initiated, then in a later "drag" event calls preventDefault().

Per HTML, "User agents must, as soon as the drag operation is initiated and every 350ms" ... "Fire a DND event named drag at the source node. If this event is canceled, the user agent must set the current drag operation to "none" (no drag operation)." ... "if the drag event was canceled, then this will be the last iteration"

Per @dway123 browsers (Chrome, Firefox, Safari) don't actually behave this way. Perhaps the spec should be updated to reflect reality?

(I only tested in Chrome myself.)

Dominant language
HTML
Stars
9.4k
Forks
3.2k
Avg merge
3d 9h
Merged PRs (30d)
38

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from whatwg/html

All issues in whatwg/html

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.