Closed Bug 136326 Opened 22 years ago Closed 20 years ago

label does not give focus to text box on click

Categories

(Core :: XUL, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: brant, Assigned: hewitt)

References

()

Details

(Keywords: access)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.9+)
Gecko/20020408
BuildID:    2002040803

According to the test at http://www.mozilla.org/projects/xul/tests/label.xul,
when I click the label, focus should go to text box.  This does not occur.

Reproducible: Always
Steps to Reproduce:
1. Load http://www.mozilla.org/projects/xul/tests/label.xul.
2. Click label.

Actual Results:  Focus does not change.

Expected Results:  Focus should change to text box.
filed in wrong component
Component: HTML Form Controls → XP Toolkit/Widgets: XUL
-->
Assignee: rods → hewitt
-->
Mozilla 0.9.9
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020313

I'm experiencing the same problem.  Clicking the label appears to be
accompanied by a javascript error:
  Error: controlElementID.focus is not a function
Using the Access key does, however, work.
Blake resolved another bug that brought up this issue INVALID. I'm not sure if
it is invalid though, since the actual XUL tests up on mozilla.org seem to say
otherwise.

Blake, Hyatt, care to comment?
Changing OS since this occured on Linux also according to comment #4.
OS: Windows XP → All
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc3) Gecko/20020523

Labels also do not work with the above.  This is weird and annoying seeing as
they certainly used to work in Mozilla.
Clicking a label for a checkbox does however still toggle the checkbox's state.
 This is illustrated by
http://www.mozilla.org/newlayout/testcases/htmlforms/label.html.  Having labels
work in this situation, but do nothing in the case of a text input is very
counter-intuitive.

I don't see how this bug could possibly be invalid.  From the w3c HTML 4.01 spec
(http://www.w3.org/TR/html401/interact/forms.html#h-17.9.1):
When a LABEL element receives focus, it passes the focus on to its associated
control.
XUL <label> and HTML <label> are two *totally* different things. Please don't
mix them. This bug is about XUL <label>. If there are issues with the HTML
<label> please file seperate bugs in the appropriate component.
My apologies.  Somehow, the XUL-ness of this bug totally passed me buy.  My
comments belonged in 28657.
I don't know if it is a duplicate, but I just found that the keyboard access key
works.
Keywords: access
made summary more specific
Summary: label clicking does not work → label does not give focus to text box on click
Flags: wanted1.3a?
We're not going to hold 1.3a for this. That doesn't mean that a fix won't be
included in 1.3a, just that drivers won't hold the release for it.
(The "wanted1.3a" flag has been changed to "blocking1.3a" to
more accurately reflect how the flag is used by drivers@mozilla.org). 
Flags: blocking1.3a? → blocking1.3a-
Using the July 17 2004's nightly of Seamonkey, the label in fact does give focus
to the text box on clicking.  Someone who can should mark this as FIXED.
I confirm that this works in Firefox 0.9.2.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: madhur → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.