Bug 19041 - Add "dragexit" event to the drag-and-drop model
Add "dragexit" event to the drag-and-drop model
Status: RESOLVED FIXED
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec
unspecified
All All
: P2 major
: ---
Assigned To: Silvia Pfeiffer
HTML WG Bugzilla archive list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-25 21:58 UTC by contributor
Modified: 2013-04-08 06:47 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description contributor 2012-09-25 21:58:37 UTC
This was was cloned from bug 11568 as part of operation LATER convergence.
Originally filed: 2010-12-17 11:28:00 +0000
Original reporter: Giorgio <giorgio.liscio@email.it>

================================================================================
 #0   Giorgio                                         2010-12-17 11:28:15 +0000 
--------------------------------------------------------------------------------
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
================================================================================
 #1   Ian 'Hixie' Hickson                             2011-01-11 19:21:00 +0000 
--------------------------------------------------------------------------------
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.
================================================================================
 #2   Giorgio                                         2011-01-12 08:39:15 +0000 
--------------------------------------------------------------------------------
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?
================================================================================
 #3   Giorgio                                         2011-01-12 17:41:57 +0000 
--------------------------------------------------------------------------------
sorry if i reopen, maybe i need to do this to have comments about include dragexit too in the spec
================================================================================
 #4   Ian 'Hixie' Hickson                             2011-02-15 00:08:47 +0000 
--------------------------------------------------------------------------------
Do you have a testcase demonstrating this? I tried testing it but was unsuccessful in demonstrating the existence of 'dragexit' events.
================================================================================
 #5   Giorgio                                         2011-02-15 02:52:14 +0000 
--------------------------------------------------------------------------------
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
================================================================================
 #6   Giorgio                                         2011-02-15 03:02:16 +0000 
--------------------------------------------------------------------------------
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
================================================================================
 #7   Ian 'Hixie' Hickson                             2011-05-03 19:27:40 +0000 
--------------------------------------------------------------------------------
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.
================================================================================
 #9   Giorgio                                         2012-06-12 17:12:57 +0000 
--------------------------------------------------------------------------------
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?
================================================================================
 #10  Giorgio                                         2012-06-12 17:14:01 +0000 
--------------------------------------------------------------------------------
Created attachment 1143 [details]
wrong event order
================================================================================
Comment 1 Silvia Pfeiffer 2013-04-08 06:47:31 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-v2.html

Status: Partially Accepted

Change Description:
https://github.com/w3c/html/commit/799c5159f6402d2a9d843cd562dbdada19a656c3

Rationale: Followed WHATWG resolution.