[whatwg] bubbling events on labels

Ian Hickson ian at hixie.ch
Wed Aug 4 16:03:19 PDT 2010


On Fri, 4 Jun 2010, Diego Perini wrote:
>
> I have different behavior in browsers with the "checked" state of a 
> checkbox input element.
> 
> I have filed a ticket in Webkit and I am looking after some 
> advice/suggestion about the correct behavior expected from this HTML:
> 
>    <label>
>      <input type="checkbox">
>      <a href="#">Enable</a>
>    </label>
> 
> It seems Safari/Chrome are discarding the click bubbling at the link 
> level, thus never reaching the label and not toggling the checkbox.
> 
> The behavior in Firefox/Opera and in Safari/Chrome is different and the 
> checkbox is correctly "checked" (as I would have expected).
> 
> Should a click on the link make the input checked ?

On Fri, 4 Jun 2010, Tab Atkins Jr. wrote:
> 
> As far as I can tell, section 3.5.2.1.7 (Interactive Content) specifies 
> that clicking the link in that situation should activate the link and 
> not toggle the checkbox.

Indeed.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list