Closed Bug 296135 Opened 19 years ago Closed 14 years ago

Form input fields inside label tags behaves irregularly

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 213519

People

(Reporter: gregaryh, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 We ran across an intersting issue in our bugzilla installation and it seems to be a browser problem. it arrises int the following html: <input type="radio" name="button"> <label for="button"> Label text <input name="text"> </label> When clicking in the text box on the web form, it selects the radio button (which is good) but then removes the focus from the text box and places it on the radio button (which is bad). This only seems to have been a problem since upgrading to firefox 1.0.1 and later but we may be wrong. Reproducible: Always
Could you attach a testcase to this bug please. ->Core: Event Handling
Assignee: nobody → events
Component: Form Manager → Event Handling
Product: Firefox → Core
QA Contact: form.manager → ian
Version: unspecified → Trunk
Here is the actual code that was having the problem: <!-- CODE START --> <input class="hdr-forms" type="radio" id="knob-leave" name="knob" value="none" checked="checked"> <label for="knob-leave"><nobr> Leave as <b>NEEDINFO&nbsp;</b> - Request info from: <input class="hdr-forms" name="infoprov_name" type="text" size="18" value=ghendricks&#64;novell.com> <a href="javascript:userLookup('document.changeform.infoprov_name', document.changeform.infoprov_name.value);"> <image src="users.png" border="0" alt="Lookup User"></a> </nobr></label> <br> <!-- CODE END --> The solution was to move the </label> tag to not include the <input> tag. When we did this it fixed the problem. In testing the snippet I wrote in comment 0 for the bug, there does not seem to be any problem with it (it does not reporoduce the bug). I will attach the html page that is came from as well.
Attached file HTML code with the problem (deleted) —
Reducing the code to: <input id="knob" type="radio"> <label for="knob"> Leave as <b>NEEDINFO&nbsp;</b> - Request info from: <input name="infoprov_name"> </label> Produces the error. I forgot the id attribute in the radio button before.
This is a duplicate....
Whiteboard: DUPEME
(In reply to comment #5) > This is a duplicate.... certainly one of these... all related? bug 163912 Bug 185758 Bug 213519 bug 214368 Bug 295336 Bug 303382 and maybe bug 181331 bug 263999 bug 171255 Bug 229925 eventually getting back to, for example bug 234455 bug 127903
OS: Linux → All
Hardware: PC → All
Assignee: events → nobody
QA Contact: ian → events
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: