clarified that 'click' is device-independent, added example related to text nodes for click per ACTION-516
authorschepers
Thu, 15 Apr 2010 02:08:32 +0900
changeset 249 e89c8f38bc62
parent 248 d0a39ca14fc9
child 250 6d4728932571
clarified that 'click' is device-independent, added example related to text nodes for click per ACTION-516
html/DOM3-Events.html
--- a/html/DOM3-Events.html	Thu Apr 15 00:14:27 2010 +0900
+++ b/html/DOM3-Events.html	Thu Apr 15 02:08:32 2010 +0900
@@ -23,13 +23,13 @@
       <h2 id="Overview-W3C-doctype">W3C Editor's Draft <time datetime="2010-04-14">14 April 2010</time></h2>
       <dl>
         <dt>This version:</dt>
-        <dd><a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.125">http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.125</a></dd>
+        <dd><a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.126">http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.126</a></dd>
 
         <dt>Latest stable version:</dt>
         <dd><a href="http://www.w3.org/TR/DOM-Level-3-Events">http://www.w3.org/TR/DOM-Level-3-Events</a></dd>
 
         <dt>Previous version:</dt>
-        <dd><a href="http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.124">http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.124</a></dd>
+        <dd><a href="http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.125">http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.125</a></dd>
 
         <dt>Editor's Draft:</dt>
         <dd><a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html">http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html</a></dd>
@@ -2818,12 +2818,16 @@
               </tr>
             </table>
             
-            <p>The <a class="eventtype" href="#event-type-click"><code>click</code></a> event must be dispatched on the <a class="def" href="#glossary-topmost-event-target">topmost event target</a> indicated by the pointer, when the user presses down and releases the pointer button, or otherwise activates the pointer in a manner that simulates such an action.  The actuation method of the mouse button must depend upon the pointer device and the environment configuration, e.g. it may depend on the screen location or the delay between the press and release of the pointing device button.</p>
-            <p>The <a class="eventtype" href="#event-type-click"><code>click</code></a> event may be preceded by the <a class="eventtype" href="#event-type-mousedown"><code>mousedown</code></a> and <a class="eventtype" href="#event-type-mouseup"><code>mouseup</code></a> events on the same element.  Depending upon the environment configuration, the <a class="eventtype" href="#event-type-click"><code>click</code></a> event may be dispatched if one or more of the event types <a class="eventtype" href="#event-type-mouseover"><code>mouseover</code></a>, <a class="eventtype" href="#event-type-mousemove"><code>mousemove</code></a>, and <a class="eventtype" href="#event-type-mouseout"><code>mouseout</code></a> occur between the press and release of the pointing device button.  The <a class="eventtype" href="#event-type-click"><code>click</code></a> event may also be followed by the <a class="eventtype" href="#event-type-dblclick"><code>dblclick</code></a> event.</p>
+            <p>The <a class="eventtype" href="#event-type-click"><code>click</code></a> event type must be dispatched on the <a class="def" href="#glossary-topmost-event-target">topmost event target</a> indicated by the pointer, when the user presses down and releases the pointer button, or otherwise activates the pointer in a manner that simulates such an action.  The actuation method of the mouse button must depend upon the pointer device and the environment configuration, e.g. it may depend on the screen location or the delay between the press and release of the pointing device button.</p>
+            <p>The <a class="eventtype" href="#event-type-click"><code>click</code></a> event may be preceded by the <a class="eventtype" href="#event-type-mousedown"><code>mousedown</code></a> and <a class="eventtype" href="#event-type-mouseup"><code>mouseup</code></a> events on the same element, disregarding changes between other node types (e.g. text nodes).  Depending upon the environment configuration, the <a class="eventtype" href="#event-type-click"><code>click</code></a> event may be dispatched if one or more of the event types <a class="eventtype" href="#event-type-mouseover"><code>mouseover</code></a>, <a class="eventtype" href="#event-type-mousemove"><code>mousemove</code></a>, and <a class="eventtype" href="#event-type-mouseout"><code>mouseout</code></a> occur between the press and release of the pointing device button.  The <a class="eventtype" href="#event-type-click"><code>click</code></a> event may also be followed by the <a class="eventtype" href="#event-type-dblclick"><code>dblclick</code></a> event.</p>
+            
+            <p id="example-mousemove-click" class="example"><strong>Example:</strong> If a user mouses down on a text node child of a &lt;p&gt; element which has been styled with a large line-height, shifts the mouse slightly such that it is no longer over an area containing text but is still within the containing block of that &lt;p&gt; element (i.e. the pointer is between lines of the same text block, but not over the text node per se), then subsequently mouses up, this should still trigger a <a class="eventtype" href="#event-type-click"><code>click</code></a> event (if it falls within the normal temporal hysteresis for a <a class="eventtype" href="#event-type-click"><code>click</code></a>), since the user has stayed within the scope of the same element; text nodes cannot be registered as event listeners.</p>
+            
+            <!-- text nodes cannot be registered as event listeners, serve as the target of events, only element and document nodes are event targets. -->
             
             <p>In addition to being associated with pointer devices, the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type must be dispatched as part of an element activation, as described in <a href="#event-flow-activation">Activation triggers and behavior</a>.</p>
             
-            <p class="note" id="click-activation"><strong>Note:</strong>  For maximum accessibility, authors should use the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type when defining activation behavior for custom controls, rather than other pointing-device event types such as <a class="eventtype" href="#event-type-mousedown"><code>mousedown</code></a> or <a class="eventtype" href="#event-type-mouseup"><code>mouseup</code></a>, which are more device-specific.</p>
+            <p class="note" id="click-activation"><strong>Note:</strong>  For maximum accessibility, authors should use the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type when defining activation behavior for custom controls, rather than other pointing-device event types such as <a class="eventtype" href="#event-type-mousedown"><code>mousedown</code></a> or <a class="eventtype" href="#event-type-mouseup"><code>mouseup</code></a>, which are more device-specific.  Though the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type has its origins in pointer devices (e.g. a mouse), subsequent implementation enhancements have extended it beyond that association, and it should be considered a device-independent event type for element activation.</p>
             
             <p>The <a class="def" href="#glossary-default-action">default action</a> of the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type varies based on the <a class="def" href="#glossary-proximal-event-target">proximal event target</a> of the event and the value of the <a href="#events-Events-MouseEvent-button"><code>MouseEvent.button</code></a> or <a href="#events-Events-MouseEvent-buttons"><code>MouseEvent.buttons</code></a> attributes.  Typical <a class="def" href="#glossary-default-action">default actions</a> of the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type are as follows:</p>
             <ul>