User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:22.214.171.124) Gecko/20101012 Firefox/3.6.11 ( .NET CLR 3.5.30729) If you have a pulldownmenu inside a label for a checkbox or radiobutton and click the pulldown, it loses focus to the element the label is defined for. Resulting in the pulldownmenu not extending. If you click and drag the mouse out of the label area and the release, the menu stays extended, but the element the label is defined for will not be triggered. Reproducible: Always Steps to Reproduce: 1. create a radio button 2. create a label for the radio button 3. create a pulldownmenu inside the label 4. click the pulldown menu Actual Results: radiobutton is checked, pulldown doest extend Expected Results: check the radiobutton and extend the pulldown If you test the same situation in Chrome or IE it works as expected.
I mean expanding of course instead of extending
Can you attach a testcase or point to a public URL that exhibits the issue?
Reporter -> Are you still experiencing this issue? Please attach a testcase or provide a URL
Sorry for the late reaction, Yes, we're still experiencing the unexpected results. http://mijnknwu.knwu.nl/dev/labeltest.html
I am getting the same results in the latest nightly -> Mozilla/5.0 (Windows NT 5.1; rv:2.0b13pre) Gecko/20110226 Firefox/4.0b13pre ID:20110226030401 Also see with SeaMonkey so moving to Core:General for now.
If the pulldown is inside the label, then clicking the pulldown will activate the label, no? And activating a label focuses the labeled element.
Also note that per http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#the-label-element the allowed children of <label> are: Phrasing content, but with no descendant labelable form-associated elements unless it is the element's labeled control, and no descendant label elements. <select> is a labelable form-associated element. So the markup in the example is invalid; how it gets handled is defined by the spec as error-handling behavior, but its defined to be simple, not to "do what I mean".
(In reply to comment #7) > So the markup in the example is invalid; Resolved invalid?
I'm experiencing the same issue. The problem here is that previous versions of the browser supported this behavior and other browsers still support it. (Select the labeled element AND expand the dropdown). Many sites rely on this behavior to set correct values for the labeled elements without having to use JS to replicate the behavior. Please consider changing the behavior. Thanks
Will, you're going to have to raise that issue with the HTML working group; see the spec quote from comment 7. email@example.com is the relevant mailing list.