<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>11568</bug_id>
          
          <creation_ts>2010-12-17 11:28:15 +0000</creation_ts>
          <short_desc>Add &quot;dragexit&quot; event to the drag-and-drop model</short_desc>
          <delta_ts>2013-03-18 22:15:54 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://www.w3.org/Bugs/Public/show_bug.cgi?id=19041</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Giorgio">giorgio.liscio</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>giorgio.liscio</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>43449</commentid>
    <comment_count>0</comment_count>
    <who name="Giorgio">giorgio.liscio</who>
    <bug_when>2010-12-17 11:28:15 +0000</bug_when>
    <thetext>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 &quot;last-fired-event&quot; the &quot;dragleave&quot;.

that means, for me, &quot;no drag operation is in progress&quot;

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44189</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-01-11 19:21:00 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;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&apos;s awkward (you have to track the targets from the ancestor dragleave event handler to make sure you don&apos;t screw it up), but it&apos;s what IE does, and we&apos;re just speccing what IE does here. Changing it would risk breaking pages written to work with IE&apos;s drag-and-drop over the last decade or so.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44267</commentid>
    <comment_count>2</comment_count>
    <who name="Giorgio">giorgio.liscio</who>
    <bug_when>2011-01-12 08:39:15 +0000</bug_when>
    <thetext>hi Hixie, mozilla supports both dragleave and dragexit (old mozilla&apos;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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44286</commentid>
    <comment_count>3</comment_count>
    <who name="Giorgio">giorgio.liscio</who>
    <bug_when>2011-01-12 17:41:57 +0000</bug_when>
    <thetext>sorry if i reopen, maybe i need to do this to have comments about include dragexit too in the spec</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45509</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-02-15 00:08:47 +0000</bug_when>
    <thetext>Do you have a testcase demonstrating this? I tried testing it but was unsuccessful in demonstrating the existence of &apos;dragexit&apos; events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45545</commentid>
    <comment_count>5</comment_count>
      <attachid>955</attachid>
    <who name="Giorgio">giorgio.liscio</who>
    <bug_when>2011-02-15 02:52:14 +0000</bug_when>
    <thetext>Created attachment 955
dragexit vs dragleave

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

thank you</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45546</commentid>
    <comment_count>6</comment_count>
    <who name="Giorgio">giorgio.liscio</who>
    <bug_when>2011-02-15 03:02:16 +0000</bug_when>
    <thetext>a note:

i&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47876</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-05-03 19:27:40 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;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&apos;ve not added this to the spec yet, but I think we should probably do so in due course. Before we do so, I&apos;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 &apos;dragexit&apos; before I&apos;ve specced it please let me know and I&apos;ll prioritize this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53858</commentid>
    <comment_count>8</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:33:52 +0000</bug_when>
    <thetext>mass-move component to LC1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69006</commentid>
    <comment_count>9</comment_count>
    <who name="Giorgio">giorgio.liscio</who>
    <bug_when>2012-06-12 17:12:57 +0000</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69007</commentid>
    <comment_count>10</comment_count>
      <attachid>1143</attachid>
    <who name="Giorgio">giorgio.liscio</who>
    <bug_when>2012-06-12 17:14:01 +0000</bug_when>
    <thetext>Created attachment 1143
wrong event order</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82043</commentid>
    <comment_count>11</comment_count>
    <who name="">public-rdfa-wg</who>
    <bug_when>2013-01-24 06:57:45 +0000</bug_when>
    <thetext>This bug was cloned to create HTML WG bug 19041.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84578</commentid>
    <comment_count>12</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-03-18 22:15:54 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7760.
Check-in comment: Add &apos;dragexit&apos; event similar to what Firefox does.
http://html5.org/tools/web-apps-tracker?from=7759&amp;to=7760</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>955</attachid>
            <date>2011-02-15 02:52:14 +0000</date>
            <delta_ts>2011-02-15 02:52:14 +0000</delta_ts>
            <desc>dragexit vs dragleave</desc>
            <filename>dragexitVSdragleave.htm</filename>
            <type>text/html</type>
            <size>892</size>
            <attacher name="Giorgio">giorgio.liscio</attacher>
            
              <data encoding="base64">PGRpdiBpZD0ibG9nIiBzdHlsZT0iZmxvYXQ6cmlnaHQ7Ij48L2Rpdj4NCg0KPGRpdiBpZD0iZHJh
Z21lIiBkcmFnZ2FibGU9InRydWUiIHN0eWxlPSJib3JkZXI6M3B4IHJlZCBzb2xpZDtwYWRkaW5n
OjEwcHg7d2lkdGg6MTAwcHg7Ij4gZHJhZyBtZSA8L2Rpdj4NCg0KI0FBQToNCjxkaXYgaWQ9ImFh
YSIgc3R5bGU9ImJvcmRlcjoycHggYmxhY2sgZG90dGVkO3dpZHRoOjIwMHB4O2hlaWdodDoyMDBw
eDtwYWRkaW5nOjQwcHg7Ij4NCgk8ZGl2IGlkPSJiYmIiIHN0eWxlPSJib3JkZXI6MnB4IGJsYWNr
IGRvdHRlZDtwYWRkaW5nOjIwcHg7Ij4NCgkJI0JCQg0KCTwvZGl2Pg0KPC9kaXY+DQoNCjxzY3Jp
cHQ+DQoNCnZhciBsb2cgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgibG9nIik7DQoNCnZhciBh
YWEgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiYWFhIik7DQoNCmRvY3VtZW50LmdldEVsZW1l
bnRCeUlkKCJkcmFnbWUiKS5hZGRFdmVudExpc3RlbmVyKCJkcmFnc3RhcnQiLGZ1bmN0aW9uKGV2
KXtldi5kYXRhVHJhbnNmZXIuc2V0RGF0YSgidGV4dC9wbGFpbiIsInRlc3QiKTt9LHRydWUpOw0K
ZnVuY3Rpb24gc2hvd2V2ZW50KGV2KXsgbG9nLmlubmVySFRNTCArPSAoZXYudGFyZ2V0LmlkID8g
ZXYudGFyZ2V0LmlkIDogJycpICsgIiAiICsgZXYudHlwZSArICI8YnI+IiArIChldi50eXBlPT0i
ZHJhZ2xlYXZlIiA/ICItLS0tLS0tLS08YnI+IiA6ICIiKTt9DQoNCmFhYS5hZGRFdmVudExpc3Rl
bmVyKCJkcmFnZW50ZXIiLCBzaG93ZXZlbnQsdHJ1ZSk7DQphYWEuYWRkRXZlbnRMaXN0ZW5lcigi
ZHJhZ2V4aXQiLCBzaG93ZXZlbnQsdHJ1ZSk7DQphYWEuYWRkRXZlbnRMaXN0ZW5lcigiZHJhZ2xl
YXZlIiwgc2hvd2V2ZW50LHRydWUpOw0KDQoNCjwvc2NyaXB0Pg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1143</attachid>
            <date>2012-06-12 17:14:01 +0000</date>
            <delta_ts>2012-06-12 17:14:01 +0000</delta_ts>
            <desc>wrong event order</desc>
            <filename>dragdrop.htm</filename>
            <type>text/html</type>
            <size>837</size>
            <attacher name="Giorgio">giorgio.liscio</attacher>
            
              <data encoding="base64">PGRpdiBpZD0idGVzdCIgc3R5bGU9ImJvcmRlcjozcHggYmxhY2sgc29saWQ7YmFja2dyb3VuZDpy
Z2IoMjAwLDIwMCwyMDApOyI+DQoJPGJyPjxicj4NCgk8cCBzdHlsZT0iYmFja2dyb3VuZDp3aGl0
ZTtwYWRkaW5nOjEwcHg7bWFyZ2luOjEwcHg7Ij5EUk9QIFRFWFQgSEVSRSAod2hpdGUgcGFyYWdy
YXBoLCBjaGlsZCBvZiBncmF5IGFyZWEpPC9wPg0KCTxicj48YnI+DQo8L2Rpdj4NCg0KZHJhZyBU
SElTIHRleHQgb3ZlciB0aGUgZ3JheSBhcmVhLCB0aGVuIG92ZXIgdGhlIHdoaXRlIHBhcmFncmFw
aDxicj4NCg0KPHNjcmlwdD4NCmZ1bmN0aW9uIGxvZ2codGV4dCkNCnsNCmRvY3VtZW50LmJvZHku
YXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUodGV4dCkpOw0KZG9jdW1lbnQuYm9k
eS5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJiciIpKTsNCn0NCg0KdmFyIGEg
PSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgidGVzdCIpOw0KYS5hZGRFdmVudExpc3RlbmVyKCJk
cmFnZW50ZXIiLCBmdW5jdGlvbihldil7IGxvZ2coZXYudHlwZSArICIgb24gIiArIGV2LnRhcmdl
dCk7IHRoaXMuc3R5bGUuYm9yZGVyPSIzcHggcmVkIGRvdHRlZCI7IH0sZmFsc2UpOw0KYS5hZGRF
dmVudExpc3RlbmVyKCJkcmFnbGVhdmUiLCBmdW5jdGlvbihldil7IGxvZ2coZXYudHlwZSArICIg
b24gIiArIGV2LnRhcmdldCk7IHRoaXMuc3R5bGUuYm9yZGVyPSIzcHggYmxhY2sgc29saWQiOyB9
LGZhbHNlKTsNCmEuYWRkRXZlbnRMaXN0ZW5lcigiZHJhZ292ZXIiLCBmdW5jdGlvbihldil7ZXYu
cHJldmVudERlZmF1bHQoKTt9LGZhbHNlKTsNCg0KPC9zY3JpcHQ+
</data>

          </attachment>
      

    </bug>

</bugzilla>