[whatwg] bubbling events on labels
diego.perini at gmail.com
Mon Jun 7 06:41:50 PDT 2010
Sorry for the previous spam ... :) I am new to this !
Exactly TJ, I am trying to navigate through internal targets inside the same
I have to admit Ashley is correctly suspicious since I walked over the
difference in browsers behavior by trying to use the CSS3 :target selector
for a simple navigation menu. I didn't expect complete success by stretching
simple task. I needed a way to keep the state of the current active menu and
I thought I could use a checkbox group for that. And yes it is a bit of a
hack, sorry for that !
There are probably better solutions/approach without too much complexity I
was just pushing a bit and see what I could get at from the pseudo selectors
Many thanks TJ for pointing me to the relevant documentation, will read
through it immediately.
On Sat, Jun 5, 2010 at 12:26 AM, Tab Atkins Jr. <jackalmage at gmail.com>wrote:
> On Fri, Jun 4, 2010 at 3:24 PM, Ashley Sheridan
> <ash at ashleysheridan.co.uk> wrote:
> > On Fri, 2010-06-04 at 15:21 -0700, Tab Atkins Jr. wrote:
> >> On Fri, Jun 4, 2010 at 2:58 PM, Diego Perini <diego.perini at gmail.com>
> >>> I have different behavior in browsers with the "checked" state of a
> >>> 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
> >>> 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 ?
> >> As far as I can tell, section 188.8.131.52.7 (Interactive Content)
> >> specifies that clicking the link in that situation should activate the
> >> link and not toggle the checkbox.
> > I do wonder though in what situation you would ever have that sort if
> code layout and want the checkbox selected when the link is clicked.
> Clicking the link will navigate away anyway, making the form element useless
> in that context.
> Not if the link is just to a target on the page, like it is in the
> example given.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg