Permalink
Browse files

[giow] (2) Change how nested clicks are prevented to also prevent cli…

…ck() inside a regular onclick=''. (part 2)

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14427

git-svn-id: http://svn.whatwg.org/webapps@6818 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Nov 4, 2011
1 parent 7e5970a commit 9ef5c937b9091883fdc7280812cd04cfcaa88a40
Showing with 45 additions and 20 deletions.
  1. +15 −7 complete.html
  2. +15 −7 index
  3. +15 −6 source
View
@@ -11810,7 +11810,13 @@ <h6 id=interactive-content-0><span class=secno>3.2.5.1.7 </span>Interactive cont
</ol><p>When a pointing device is clicked, the user agent must run these
steps:</p>
- <ol><li><p>Let <var title="">e</var> be the <a href=#nearest-activatable-element>nearest activatable
+ <ol><li><p>If the element's <var title="">click in progress</var> flag
+ is set to true, then abort these steps.</li>
+
+ <li><p>Set the <var title="">click in progress</var> flag on the
+ element to true.</li>
+
+ <li><p>Let <var title="">e</var> be the <a href=#nearest-activatable-element>nearest activatable
element</a> of the element designated by the user (defined
below), if any.</li>
@@ -11822,16 +11828,18 @@ <h6 id=interactive-content-0><span class=secno>3.2.5.1.7 </span>Interactive cont
<p>Dispatch the required <code title=event-click><a href=#event-click>click</a></code>
event.</p> <!-- interaction event spec point -->
- <p>If there is an element <var title="">e</var>, then the default
- action of the <code title=event-click><a href=#event-click>click</a></code> event must be
- to <a href=#run-post-click-activation-steps>run post-click activation steps</a> on element <var title="">e</var>.</p>
+ <p>If there is an element <var title="">e</var> and the <code title=event-click><a href=#event-click>click</a></code> event is not canceled, <a href=#run-post-click-activation-steps>run
+ post-click activation steps</a> on element <var title="">e</var>.</p>
- <p>If there is an element <var title="">e</var> but the event is
- canceled, the user agent must <a href=#run-canceled-activation-steps>run canceled activation
- steps</a> on element <var title="">e</var>.</p>
+ <p>If there is an element <var title="">e</var> and the event
+ <em>is</em> canceled, <a href=#run-canceled-activation-steps>run canceled activation steps</a>
+ on element <var title="">e</var>.</p>
</li>
+ <li><p>Set the <var title="">click in progress</var> flag on the
+ element to false.</li>
+
</ol><p class=note>The above doesn't happen for arbitrary synthetic
events dispatched by author script. However, the <code title=dom-click><a href=#dom-click>click()</a></code> method can be used to make it
happen programmatically.</p>
View
22 index
@@ -11810,7 +11810,13 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
</ol><p>When a pointing device is clicked, the user agent must run these
steps:</p>
- <ol><li><p>Let <var title="">e</var> be the <a href=#nearest-activatable-element>nearest activatable
+ <ol><li><p>If the element's <var title="">click in progress</var> flag
+ is set to true, then abort these steps.</li>
+
+ <li><p>Set the <var title="">click in progress</var> flag on the
+ element to true.</li>
+
+ <li><p>Let <var title="">e</var> be the <a href=#nearest-activatable-element>nearest activatable
element</a> of the element designated by the user (defined
below), if any.</li>
@@ -11822,16 +11828,18 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
<p>Dispatch the required <code title=event-click><a href=#event-click>click</a></code>
event.</p> <!-- interaction event spec point -->
- <p>If there is an element <var title="">e</var>, then the default
- action of the <code title=event-click><a href=#event-click>click</a></code> event must be
- to <a href=#run-post-click-activation-steps>run post-click activation steps</a> on element <var title="">e</var>.</p>
+ <p>If there is an element <var title="">e</var> and the <code title=event-click><a href=#event-click>click</a></code> event is not canceled, <a href=#run-post-click-activation-steps>run
+ post-click activation steps</a> on element <var title="">e</var>.</p>
- <p>If there is an element <var title="">e</var> but the event is
- canceled, the user agent must <a href=#run-canceled-activation-steps>run canceled activation
- steps</a> on element <var title="">e</var>.</p>
+ <p>If there is an element <var title="">e</var> and the event
+ <em>is</em> canceled, <a href=#run-canceled-activation-steps>run canceled activation steps</a>
+ on element <var title="">e</var>.</p>
</li>
+ <li><p>Set the <var title="">click in progress</var> flag on the
+ element to false.</li>
+
</ol><p class=note>The above doesn't happen for arbitrary synthetic
events dispatched by author script. However, the <code title=dom-click><a href=#dom-click>click()</a></code> method can be used to make it
happen programmatically.</p>
View
21 source
@@ -12204,6 +12204,12 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
<ol>
+ <li><p>If the element's <var title="">click in progress</var> flag
+ is set to true, then abort these steps.</p></li>
+
+ <li><p>Set the <var title="">click in progress</var> flag on the
+ element to true.</p></li>
+
<li><p>Let <var title="">e</var> be the <span>nearest activatable
element</span> of the element designated by the user (defined
below), if any.</p></li>
@@ -12216,17 +12222,20 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
<p>Dispatch the required <code title="event-click">click</code>
event.</p> <!-- interaction event spec point -->
- <p>If there is an element <var title="">e</var>, then the default
- action of the <code title="event-click">click</code> event must be
- to <span>run post-click activation steps</span> on element <var
+ <p>If there is an element <var title="">e</var> and the <code
+ title="event-click">click</code> event is not canceled, <span>run
+ post-click activation steps</span> on element <var
title="">e</var>.</p>
- <p>If there is an element <var title="">e</var> but the event is
- canceled, the user agent must <span>run canceled activation
- steps</span> on element <var title="">e</var>.</p>
+ <p>If there is an element <var title="">e</var> and the event
+ <em>is</em> canceled, <span>run canceled activation steps</span>
+ on element <var title="">e</var>.</p>
</li>
+ <li><p>Set the <var title="">click in progress</var> flag on the
+ element to false.</p></li>
+
</ol>
<p class="note">The above doesn't happen for arbitrary synthetic

0 comments on commit 9ef5c93

Please sign in to comment.