W3C home > Mailing lists > Public > public-pointer-events@w3.org > April to June 2017

[pointerevents] Should DnD release pointer capture?

From: Navid Zolghadr via GitHub <sysbot+gh@w3.org>
Date: Tue, 04 Apr 2017 20:30:51 +0000
To: public-pointer-events@w3.org
Message-ID: <issues.opened-219373518-1491337849-sysbot+gh@w3.org>
NavidZ has just created a new issue for https://github.com/w3c/pointerevents:

== Should DnD release pointer capture? ==
Following #135 I believe there was an agreement that when DnD starts it should release the pointer capture of the pointer that initiated the DnD. I faced another question while implementing this in Chrome.

**Should the lostpointercapture be sent after dragstart event or right before?**

Testing [this example](http://jsbin.com/giqopi/edit?html,output) on Edge it seems that if fires the lostpointercapture sometime after dragstart. Edge may also send a few drag events before firing lostpointercapture depending on how much you move the mouse.

I believe it might be a little inconsistent with what the [DnD](http://w3c.github.io/html/editing.html#drag-and-drop) spec says:
_From the moment that the user agent is to initiate the drag-and-drop operation, until the end of the drag-and-drop operation, device input events (e.g., mouse and keyboard events) must be suppressed._

However, the spec didn't define what exactly drag-and-drop operation is. For example if js calls preventDefault in dragstart event handler the drag doesn't continue (or not even start I guess).

**Having said all these, and to also making it consistent across the board, I suggest sending lostpointercapture right before dragstart event if no one has any point against it.**


Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/194 using your GitHub account
Received on Tuesday, 4 April 2017 20:30:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 4 April 2017 20:30:58 UTC