Closed Bug 1400792 Opened 7 years ago Closed 7 years ago

[Pointer Event] fire pointercancel when starting a dnd session

Categories

(Core :: DOM: Events, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox57 --- unaffected
firefox59 --- fixed

People

(Reporter: stone, Assigned: stone)

References

Details

Attachments

(1 file)

https://github.com/w3c/pointerevents/issues/194 A user agent must fire a pointer event pointercancel immediately before drag operation starts.
Assignee: nobody → sshih
Priority: -- → P2
Blocks: 822898
Summary: [Pointer Event] Implicitly release pointer capture before dragstart → [Pointer Event] Release pointer capture and stop firing pointer events when starting a dnd session
(In reply to Ming-Chou Shih [:stone] from comment #0) > https://github.com/w3c/pointerevents/issues/194 > > A user agent must fire a pointer event pointercancel immediately before drag > operation starts. We should fire pointercancel, implicitly release pointer capture, and stop firing subsequent pointer events when starting a dnd session.
(In reply to Ming-Chou Shih [:stone] from comment #1) > (In reply to Ming-Chou Shih [:stone] from comment #0) > > https://github.com/w3c/pointerevents/issues/194 > > > > A user agent must fire a pointer event pointercancel immediately before drag > > operation starts. > > We should fire pointercancel, implicitly release pointer capture, and stop > firing subsequent pointer events when starting a dnd session. Spec doesn't clearly describe when to continue firing pointer events. Fired https://github.com/w3c/pointerevents/issues/222 to discuss it.
We should have this for shipping Pointer events, so setting P1
Priority: P2 → P1
Spec [1] defines that input events must be suppressed when starting a dnd operation until it is finished. Now we fire mousemove / pointermove because they are queued in the content process when starting a dnd operation, which is separated to bug 1414204. This bug only covers the behaviour to fire pointercancel when starting a dnd operation. [1] http://w3c.github.io/html/editing.html#drag-and-drop-processing-model
Summary: [Pointer Event] Release pointer capture and stop firing pointer events when starting a dnd session → [Pointer Event] fire pointercancel when starting a dnd session
Attachment #8925040 - Flags: review?(bugs)
Comment on attachment 8925040 [details] [diff] [review] Fire pointercancel when starting a dnd operation. > if (status != nsEventStatus_eConsumeNoDefault) { > bool dragStarted = DoDefaultDragStart(aPresContext, event, dataTransfer, > targetContent, selection); > if (dragStarted) { > sActiveESM = nullptr; >+ MaybeFirePointerCancel(aEvent); > aEvent->StopPropagation(); > } > } Aha, this was a tad surprising but I see the event is dispatched only if dragstart wasn't cancelled.
Attachment #8925040 - Flags: review?(bugs) → review+
Pushed by sshih@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f763151e6c59 Fire pointercancel when starting a dnd operation. r=smaug.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: