[whatwg] Preventing nested click() calls

Hi,

WebKit, Firefox and IE all implement a protection mechanism against re- 
entering click() on the same element:

<input type="checkbox" onclick="this.click()">

WebKit (and based on testing Firefox) make click() a no-op when  
invoked as a result of a click event generated by calling click() on  
the same element. For IE this seems to be true even for user generated  
click events.

HTML5 does not currently say anything about this so presumably nested  
click() calls are allowed. A subtest of test 73 of Acid3 specifically  
tests for this.

Based on testing above shipping browsers treat click() as a special  
case. Changing this behavior to allow nested click() calls would be a  
significant regression risk. A better option would be specifying the  
click() nesting protection mechanism in HTML5.

There are more discussion in
http://bugs.webkit.org/show_bug.cgi?id=17083


   antti

Received on Monday, 10 March 2008 11:49:21 UTC