Closed Bug 143081 Opened 23 years ago Closed 23 years ago

incorrect <option> selected when list changes on reload

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 46845

People

(Reporter: jasonp019, Assigned: alexsavulov)

References

()

Details

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417 BuildID: 2002041717 When the list of options in a <select> on a form changes and the page is reloaded (without the shift key being depressed) Mozilla selects the opition that is now in the the .selectedIndex position that was current before the reload, instead of the <option selected> item of the current page. So, if one item is added to the list above the selected item, then the page reloaded, the selected item is off by one (one too high) and vice versa. Reproducible: Always Steps to Reproduce: 1. download mozilla_bug.tgz from url given in this bug report 2. extract into: mozilla_bug.html mozilla_bug1.html mozilla_bug2.html 3. load mozilla_bug.html 4. # rm mozilla_bug.html; ln -s mozilla_bug2.html mozilla_bug.html 5. click Reload in Mozilla (you'll see the selection off by one) - view source and see that opt5 should be selected. Actual Results: Off by one in the select box Expected Results: Select box should have the <option selected> item selected, not the one equivalent to the previous value of the .selectedIndex property.
Duplicate of "Form elements don't reset upon reloading page" *** This bug has been marked as a duplicate of 46845 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
verifying
Status: RESOLVED → VERIFIED
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.