Pulldown inside label loses focus before extending




7 years ago
7 years ago


(Reporter: Bas Boss, Unassigned)


Windows XP

Firefox Tracking Flags

(Not tracked)




7 years ago
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: 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.

Comment 1

7 years ago
I mean expanding of course instead of extending

Comment 2

7 years ago
Can you attach a testcase or point to a public URL that exhibits the issue?
Version: unspecified → 3.6 Branch

Comment 3

7 years ago
Reporter -> Are you still experiencing this issue? Please attach a testcase or provide a URL

Comment 4

7 years ago
Sorry for the late reaction,

Yes, we're still experiencing the unexpected results.


Comment 5

7 years ago
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.
Component: General → General
Product: Firefox → Core
QA Contact: general → general
Version: 3.6 Branch → Trunk
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".

Comment 8

7 years ago
(In reply to comment #7)
> So the markup in the example is invalid; 

Resolved invalid?

Comment 9

7 years ago
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.

Will, you're going to have to raise that issue with the HTML working group; see the spec quote from comment 7.  public-html@w3.org is the relevant mailing list.


7 years ago
Last Resolved: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.