W3C home > Mailing lists > Public > public-html-commits@w3.org > October 2009

html5/spec Overview.html,1.3420,1.3421

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 23 Oct 2009 02:15:13 +0000
To: public-html-commits@w3.org
Message-Id: <E1N19gP-0008VV-NN@lionel-hutz.w3.org>
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv32671

Modified Files:
	Overview.html 
Log Message:
drag-and-drop: handle drags to text fields properly (whatwg r4280)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.3420
retrieving revision 1.3421
diff -u -d -r1.3420 -r1.3421
--- Overview.html	23 Oct 2009 00:50:21 -0000	1.3420
+++ Overview.html	23 Oct 2009 02:15:10 -0000	1.3421
@@ -51544,42 +51544,54 @@
       element</a>, then the <a href="#current-target-element">current target element</a> must
       be updated, as follows:</p>
 
-      <ol><li>
-
-        <p>If the new <a href="#immediate-user-selection">immediate user selection</a> is null, or
-        is in a non-DOM document or application, then set the
-        <a href="#current-target-element">current target element</a> to the same value.</p>
+      <dl class="switch"><dt>If the new <a href="#immediate-user-selection">immediate user selection</a> is null, or
+       is in a non-DOM document or application</dt>
 
-       <li>
+       <dd><p>The user agent must set the <a href="#current-target-element">current target
+       element</a> to the same value.</dd>
 
-        <p>Otherwise, the user agent must fire a <code title="event-dragenter"><a href="#event-dragenter">dragenter</a></code> event at the
-        <a href="#immediate-user-selection">immediate user selection</a>.</p>
+       <dt>Otherwise</dt>
 
-       </li>
+       <dd>
 
-       <li>
+        <p>The user agent must fire a <code title="event-dragenter"><a href="#event-dragenter">dragenter</a></code> event at the
+        <a href="#immediate-user-selection">immediate user selection</a>.</p>
 
         <p>If the event is canceled, then the <a href="#current-target-element">current target
         element</a> must be set to the <a href="#immediate-user-selection">immediate user
         selection</a>.</p>
 
-       </li>
+        <p>Otherwise, the user agent must act as follows:</p>
 
-       <li>
+        <dl class="switch"><dt>If the <a href="#current-target-element">current target element</a> is a text
+         field (e.g. <code><a href="#the-textarea-element">textarea</a></code>, or an <code><a href="#the-input-element">input</a></code>
+         element whose <code title="attr-input-type"><a href="#attr-input-type">type</a></code>
+         attribute is in the <a href="#text-state-and-search-state" title="attr-input-type-text">Text</a> state) or an
+         <a href="#editable">editable</a> element</dt>
 
-        <p>Otherwise, if the <a href="#current-target-element">current target element</a> is
-        not <a href="#the-body-element">the body element</a>, the user agent must fire a
-        <code title="event-dragenter"><a href="#event-dragenter">dragenter</a></code> event at
-        <a href="#the-body-element">the body element</a>, and the <a href="#current-target-element">current target
-        element</a> must be set to <a href="#the-body-element">the body element</a>,
-        regardless of whether that event was canceled or not. (If
-        <a href="#the-body-element">the body element</a> is null, then the <a href="#current-target-element">current
-        target element</a> would be set to null too in this case,
-        it wouldn't be set to the <code>Document</code> object.)</p>
+         <dd><p>The <a href="#current-target-element">current target element</a> must be set to
+         the <a href="#immediate-user-selection">immediate user selection</a> anyway.</dd>
 
-       </li>
+         <dt>If the <a href="#current-target-element">current target element</a> is 
+         <a href="#the-body-element">the body element</a></dt>
 
-      </ol></li>
+         <dd><p>The <a href="#current-target-element">current target element</a> is left
+         unchanged.</dd>
+
+         <dt>Otherwise</dt>
+         
+         <dd><p>The user agent must fire a <code title="event-dragenter"><a href="#event-dragenter">dragenter</a></code> event at <a href="#the-body-element">the
+         body element</a>, and the <a href="#current-target-element">current target
+         element</a> must be set to <a href="#the-body-element">the body element</a>,
+         regardless of whether that event was canceled or not. (If
+         <a href="#the-body-element">the body element</a> is null, then the <a href="#current-target-element">current
+         target element</a> would be set to null too in this case,
+         it wouldn't be set to the <code>Document</code>
+         object.)</dd>
+
+        </dl></dd>
+
+      </dl></li>
 
      <li>
 
@@ -51598,11 +51610,26 @@
       target element</a>.</p>
 
       <p>If the <code title="event-dragover"><a href="#event-dragover">dragover</a></code> event is
-      not canceled, the <a href="#current-drag-operation">current drag operation</a> must be
-      reset to "none".</p>
+      not canceled, the user agent must act as follows:</p>
 
-      <p>Otherwise, the <a href="#current-drag-operation">current drag operation</a> must be
-      set based on the values the <code title="dom-DataTransfer-effectAllowed"><a href="#dom-datatransfer-effectallowed">effectAllowed</a></code> and
+      <dl class="switch"><dt>If the <a href="#current-target-element">current target element</a> is a text field
+       (e.g. <code><a href="#the-textarea-element">textarea</a></code>, or an <code><a href="#the-input-element">input</a></code> element
+       whose <code title="attr-input-type"><a href="#attr-input-type">type</a></code> attribute is in
+       the <a href="#text-state-and-search-state" title="attr-input-type-text">Text</a> state) or an
+       <a href="#editable">editable</a> element</dt>
+
+       <dd><p>The user agent must set the <a href="#current-drag-operation">current drag
+       operation</a> to either "copy" or "move", as appropriate
+       given the platform conventions.</dd>
+
+       <dt>Otherwise</dt>
+
+       <dd><p>The user agent must reset the <a href="#current-drag-operation">current drag
+       operation</a> to "none".</dd>
+
+      </dl><p>Otherwise (if the <code title="event-dragover"><a href="#event-dragover">dragover</a></code> event <em>is</em>
+      canceled), the <a href="#current-drag-operation">current drag operation</a> must be set
+      based on the values the <code title="dom-DataTransfer-effectAllowed"><a href="#dom-datatransfer-effectallowed">effectAllowed</a></code> and
       <code title="dom-DataTransfer-dropEffect"><a href="#dom-datatransfer-dropeffect">dropEffect</a></code>
       attributes of the <code title="dom-DragEvent-dataTransfer"><a href="#dom-dragevent-datatransfer">dataTransfer</a></code> object
       had after the event was handled, as per the following table:</p>
@@ -51699,13 +51726,15 @@
       <dl class="switch"><dt>If the <a href="#current-target-element">current target element</a> is a text field
        (e.g. <code><a href="#the-textarea-element">textarea</a></code>, or an <code><a href="#the-input-element">input</a></code> element
        whose <code title="attr-input-type"><a href="#attr-input-type">type</a></code> attribute is in
-       the <a href="#text-state-and-search-state" title="attr-input-type-text">Text</a> state)</dt>
+       the <a href="#text-state-and-search-state" title="attr-input-type-text">Text</a> state) or an
+       <a href="#editable">editable</a> element</dt>
 
        <dd>The user agent must insert the data associated with the
-       <code>text/plain</code> format, if any, into the text field in
-       a manner consistent with platform-specific conventions
-       (e.g. inserting it at the current mouse cursor position, or
-       inserting it at the end of the field).</dd>
+       <code>text/plain</code> format, if any, into the text field or
+       <a href="#editable">editable</a> element in a manner consistent with
+       platform-specific conventions (e.g. inserting it at the current
+       mouse cursor position, or inserting it at the end of the
+       field).</dd>
 
        <dt>Otherwise</dt>
 
Received on Friday, 23 October 2009 02:25:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 23 October 2009 02:25:28 GMT