[html5] r8143 - [giow] (3) Make sure that if you cancel a drag-and-drop operation, we reset the [...]
whatwg at whatwg.org
whatwg at whatwg.org
Tue Aug 13 12:57:11 PDT 2013
Author: ianh
Date: 2013-08-13 12:57:10 -0700 (Tue, 13 Aug 2013)
New Revision: 8143
Modified:
complete.html
index
source
Log:
[giow] (3) Make sure that if you cancel a drag-and-drop operation, we reset the current drag operation to 'none' so that you can tell in the dragend event.
Affected topics: HTML
Modified: complete.html
===================================================================
--- complete.html 2013-08-12 23:36:09 UTC (rev 8142)
+++ complete.html 2013-08-13 19:57:10 UTC (rev 8143)
@@ -256,7 +256,7 @@
<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 12 August 2013</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 13 August 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -76855,8 +76855,10 @@
// <em>...as before...</em>
}
function dragEndHandler(event) {
- // remove the dragged element
- event.target.parentNode.removeChild(event.target);
+ if (event.dataTransfer.dropEffect == 'move') {
+ // remove the dragged element
+ event.target.parentNode.removeChild(event.target);
+ }
}
</script></pre>
@@ -78383,8 +78385,10 @@
<li><p>If the <a href=#current-target-element>current target element</a> is a DOM element, <a href=#fire-a-dnd-event>fire a DND
event</a> named <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code> at it; otherwise, if it is
- not null, use platform-specific conventions for drag cancellation.</p>
+ not null, use platform-specific conventions for drag cancellation.</li>
+ <li><p>Set the <a href=#current-drag-operation>current drag operation</a> to "<code title="">none</code>".</li>
+
</ol><p>Otherwise, the drag operation might be a success; run these substeps:</p>
<ol><li><p>Let <var title="">dropped</var> be true.</li>
@@ -103293,6 +103297,7 @@
Daniel Schattenkirchner,
Daniel Spång,
Daniel Steinberg,
+ Daniel Trebbien,
Danny Sullivan,
Darin Adler,
Darin Fisher,
Modified: index
===================================================================
--- index 2013-08-12 23:36:09 UTC (rev 8142)
+++ index 2013-08-13 19:57:10 UTC (rev 8143)
@@ -256,7 +256,7 @@
<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 12 August 2013</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 13 August 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -76855,8 +76855,10 @@
// <em>...as before...</em>
}
function dragEndHandler(event) {
- // remove the dragged element
- event.target.parentNode.removeChild(event.target);
+ if (event.dataTransfer.dropEffect == 'move') {
+ // remove the dragged element
+ event.target.parentNode.removeChild(event.target);
+ }
}
</script></pre>
@@ -78383,8 +78385,10 @@
<li><p>If the <a href=#current-target-element>current target element</a> is a DOM element, <a href=#fire-a-dnd-event>fire a DND
event</a> named <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code> at it; otherwise, if it is
- not null, use platform-specific conventions for drag cancellation.</p>
+ not null, use platform-specific conventions for drag cancellation.</li>
+ <li><p>Set the <a href=#current-drag-operation>current drag operation</a> to "<code title="">none</code>".</li>
+
</ol><p>Otherwise, the drag operation might be a success; run these substeps:</p>
<ol><li><p>Let <var title="">dropped</var> be true.</li>
@@ -103293,6 +103297,7 @@
Daniel Schattenkirchner,
Daniel Spång,
Daniel Steinberg,
+ Daniel Trebbien,
Danny Sullivan,
Darin Adler,
Darin Fisher,
Modified: source
===================================================================
--- source 2013-08-12 23:36:09 UTC (rev 8142)
+++ source 2013-08-13 19:57:10 UTC (rev 8143)
@@ -86095,8 +86095,10 @@
// <em>...as before...</em>
}
function dragEndHandler(event) {
- // remove the dragged element
- event.target.parentNode.removeChild(event.target);
+ if (event.dataTransfer.dropEffect == 'move') {
+ // remove the dragged element
+ event.target.parentNode.removeChild(event.target);
+ }
}
</script></pre>
@@ -87944,8 +87946,10 @@
<li><p>If the <span>current target element</span> is a DOM element, <span>fire a DND
event</span> named <code title="event-dragleave">dragleave</code> at it; otherwise, if it is
- not null, use platform-specific conventions for drag cancellation.</p>
+ not null, use platform-specific conventions for drag cancellation.</p></li>
+ <li><p>Set the <span>current drag operation</span> to "<code title="">none</code>".</p></li>
+
</ol>
<p>Otherwise, the drag operation might be a success; run these substeps:</p>
@@ -115779,6 +115783,7 @@
Daniel Schattenkirchner,
Daniel Spång,
Daniel Steinberg,
+ Daniel Trebbien,
Danny Sullivan,
Darin Adler,
Darin Fisher,
More information about the Commit-Watchers
mailing list