<?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>16285</bug_id>
          
          <creation_ts>2012-03-09 17:23:51 +0000</creation_ts>
          <short_desc>Default actions section is quite confusing; review and polish</short_desc>
          <delta_ts>2012-03-21 00:03:54 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - DOM3 Events</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://lists.w3.org/Archives/Public/www-dom/2012JanMar/0149.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>LC, needsReview</keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Travis Leithead [MSFT]">travil</reporter>
          <assigned_to name="Travis Leithead [MSFT]">travil</assigned_to>
          <cc>annevk</cc>
    
    <cc>bugs</cc>
    
    <cc>mike</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>65216</commentid>
    <comment_count>0</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2012-03-09 17:23:51 +0000</bug_when>
    <thetext>From: Anne van Kesteren [mailto:annevk@opera.com]

&gt;&gt; It [DOM3 Events] also describes basic concepts such as default actions and their
&gt;&gt; effect on cancelable events, trusted events, etc., for which having a
&gt;&gt; central reference is quite informative.

Except the way it talks about default actions has been quite confusing,
making people think it was somehow more tied to the event than it actually
was.

-------------------------

Review that section; see if any confusing portions can be cleaned up.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65683</commentid>
    <comment_count>1</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2012-03-17 00:18:10 +0000</bug_when>
    <thetext>I made a sweep through this section and did indeed end-up re-writing it extensively. I believe what I&apos;ve written qualifies as reducing the confusion and divorcing the concept of the default action from the event objects as much as is fair to do so. 

Anne, give it a read and let me know how it can be futher polished, or if you are satisfied with it.

http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.216#event-flow-default-cancel</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65713</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-03-18 16:03:16 +0000</bug_when>
    <thetext>It still talks about as if they are somehow associated with the event object. While the code for implementing this goes like:

function run() {
  if(obj.dispatchEvent(ev)) {
    defaultAction()
  }
}

I.e. defaultAction is associated with run, not ev.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65714</commentid>
    <comment_count>3</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-03-18 16:15:29 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; It still talks about as if they are somehow associated with the event object.
&gt; While the code for implementing this goes like:
&gt; 
&gt; function run() {
&gt;   if(obj.dispatchEvent(ev)) {
&gt;     defaultAction()
&gt;   }
&gt; }
That is not what implementations do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65715</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-03-18 16:29:43 +0000</bug_when>
    <thetext>That is the logic if you look at it from JavaScript.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65784</commentid>
    <comment_count>5</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2012-03-20 00:30:39 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; It still talks about as if they are somehow associated with the event object.
&gt; While the code for implementing this goes like:
&gt; 
&gt; function run() {
&gt;   if(obj.dispatchEvent(ev)) {
&gt;     defaultAction()
&gt;   }
&gt; }
&gt; 
&gt; I.e. defaultAction is associated with run, not ev.

Hmm. So, &quot;defaultAction()&quot; is something I can easily describe. Similarly, &quot;dispatchEvent(ev)&quot; is something else I can describe. Both of these are related since the result of one (ev) is fed into the course of action for defaultAction().

&quot;run&quot; is not so easy to describe :-)

While I agree with you from a browser-maker, technical point of view, as an introduction to the concept of default actions (which the section is supposed to be), I think it&apos;s OK to have the two related to some degree.

Since you re-opened the bug, would you mind providing some replacement text for parts of that section that could be improved? My goal is not require defining &quot;run&quot;, unless you can manage it succinctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65794</commentid>
    <comment_count>6</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-03-20 01:42:34 +0000</bug_when>
    <thetext>http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#introduction-to-dom-events has introductory text on the matter. Ideally we align the text between Level 3 and 4. I basically started from scratch to get a fresh perspective on things.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65883</commentid>
    <comment_count>7</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2012-03-21 00:03:54 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#introduction-to-dom-events
&gt; has introductory text on the matter. Ideally we align the text between Level 3
&gt; and 4. I basically started from scratch to get a fresh perspective on things.

After reading your &quot;fresh perspective&quot;, I took another stab at this:
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-flow-default-cancel

Should harmonize slightly better with DOM4 prose.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>