Closed Bug 342653 Opened 18 years ago Closed 17 years ago

Creating input elements with javascript causes radio buttons to shift, and other problems.


(Core :: Layout: Form Controls, defect)

Windows XP
Not set





(Reporter: erh+mozilla, Unassigned)


(Keywords: testcase)


(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060508 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060508 Firefox/

Reloading a page after one of more input elements have been added by javascript code causes values in the form, starting with the point that the new elements were added, to be shifted over.

I initially noticed the problem with radio boxes.  For those, the selected radio button after the reload is the nth one after the one that was selected before, where n is the number of input elements inserted by the js code.

The value of checkboxes and text elements gets moved over to the next element with the same name, although on most web pages there is only a single text/checkbox element of any particular name, so the effect is that it gets cleared.

Reproducible: Always

Steps to Reproduce:
1.Create a page with a form
2.Use javascript to insert one or more input elements before some of the existing input elements.
3.Reload.  (F5)

See the attached html file for an example.
Click the link, then reload.

Expected Results:  
I expect the values to stay in the fields I put them in.
I found bug #175289 that looks like it might be related, but it doesn't actually cause a problem in the version of Firefox that I have.  (probably b/c it's part of  the Core component, rather than Firefox)
Keywords: testcase
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk
Component: General → Layout: Form Controls
QA Contact: general → layout.form-controls
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.