This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11568 - Add "dragexit" event to the drag-and-drop model
Summary: Add "dragexit" event to the drag-and-drop model
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: All All
: P2 major
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: https://www.w3.org/Bugs/Public/show_b...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-17 11:28 UTC by Giorgio
Modified: 2013-03-18 22:15 UTC (History)
6 users (show)

See Also:


Attachments
dragexit vs dragleave (892 bytes, text/html)
2011-02-15 02:52 UTC, Giorgio
Details
wrong event order (837 bytes, text/html)
2012-06-12 17:14 UTC, Giorgio
Details

Description Giorgio 2010-12-17 11:28:15 UTC
spec says that when i drag over a new item

first is fired dragenter on the new target
then is fired dragleave on the old target

i think this is wrong because any ancestor element receives as "last-fired-event" the "dragleave".

that means, for me, "no drag operation is in progress"

in mouseover/mouseout

first is fired mouseout on the old target
then is fired mouseover on the new target

when the event propagates, for example at the body element, i can determine that the mouse is over my page

with dragleave/dragenter i can not

please read test cases and samples here

https://bugzilla.mozilla.org/show_bug.cgi?id=619703
Comment 1 Ian 'Hixie' Hickson 2011-01-11 19:21:00 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: I agree that it's awkward (you have to track the targets from the ancestor dragleave event handler to make sure you don't screw it up), but it's what IE does, and we're just speccing what IE does here. Changing it would risk breaking pages written to work with IE's drag-and-drop over the last decade or so.
Comment 2 Giorgio 2011-01-12 08:39:15 UTC
hi Hixie, mozilla supports both dragleave and dragexit (old mozilla's api)

the order is:

dragexit
dragenter
dragleave


its exactly like dragleave, but it is fired before dragenter, why not include this event too to extend compatibility with mozilla?
Comment 3 Giorgio 2011-01-12 17:41:57 UTC
sorry if i reopen, maybe i need to do this to have comments about include dragexit too in the spec
Comment 4 Ian 'Hixie' Hickson 2011-02-15 00:08:47 UTC
Do you have a testcase demonstrating this? I tried testing it but was unsuccessful in demonstrating the existence of 'dragexit' events.
Comment 5 Giorgio 2011-02-15 02:52:14 UTC
Created attachment 955 [details]
dragexit vs dragleave

sure Hixie, here both events in action
you probably need and it is sure better to run this file in firefox's latest trunk
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/

thank you
Comment 6 Giorgio 2011-02-15 03:02:16 UTC
a note:

i've just tested with both firefox 3.6 and firefox 4 beta

firefox 3.6 does not match the current spec (dragenter is fired after dragleave)
firefox 4.0 matches the current spec

so
in firefox 3.6 dragexit == dragleave and they are fired both before dragenter

in firefox 4.0 the event order is:

aaa dragexit
bbb dragenter
aaa dragleave
Comment 7 Ian 'Hixie' Hickson 2011-05-03 19:27:40 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Partially Accepted
Change Description: see diff given below
Rationale: 

Thanks. Interesting.

I've not added this to the spec yet, but I think we should probably do so in due course. Before we do so, I'd like to wait to see if we can get all the other recent additions to this API implemented reliably in all the major browsers.

If another browser intends to implement 'dragexit' before I've specced it please let me know and I'll prioritize this.
Comment 8 Michael[tm] Smith 2011-08-04 05:33:52 UTC
mass-move component to LC1
Comment 9 Giorgio 2012-06-12 17:12:57 UTC
hi hixie, news about this? 

*see the attachment

when you drag over the white paragraph the drag event is still valid because the dragover bubbles up to #test

but it is impossible to handle contents according to pointer movements, because of the bad design of events

I think dragenter and dragleave events are totally useless now... but! a challenge for hackers: try to workaround this, with some code that allows to move on the white paragraph (coming from the gray area) without losing the dotted border...

... yeah... it is madness... yeah...

why the standard is what IE does and not what Firefox does?
Comment 10 Giorgio 2012-06-12 17:14:01 UTC
Created attachment 1143 [details]
wrong event order
Comment 11 public-rdfa-wg 2013-01-24 06:57:45 UTC
This bug was cloned to create HTML WG bug 19041.
Comment 12 contributor 2013-03-18 22:15:54 UTC
Checked in as WHATWG revision r7760.
Check-in comment: Add 'dragexit' event similar to what Firefox does.
http://html5.org/tools/web-apps-tracker?from=7759&to=7760