Open Bug 389601 Opened 15 years ago Updated 6 years ago

Select: delete option tags and refresh selects wrong option


(Core :: Layout: Form Controls, defect)

Windows XP
Not set





(Reporter: haysmark, Unassigned)


(Depends on 1 open bug, )


(Keywords: testcase, Whiteboard: DUPEME)


(1 file)

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

You choose the default option of a Select by adding the selected attribute.  However, in FF, if you delete all of the options from a Select, then refresh the page, FF ignores the selected attribute and instead chooses the first option.

Reproducible: Always

Steps to Reproduce:
1. Load/download URL, notice "Default" is selected in the Select
2. Click "Delete option tags"
3. Refresh.
Actual Results:  
"Not default", the first option tag in the Select, is selected on refresh.

Expected Results:  
"Default", the option tag with the selected attribute, is selected, just like when the page was first loaded.

Also refer to the Dojo Toolkit ticket at:
Component: General → Layout: Form Controls
Keywords: testcase
Product: Firefox → Core
QA Contact: general → layout.form-controls
Version: unspecified → Trunk
Might be a duplicate of bug 221851.  Certainly the same underlying cause: trying to preserve the currently selected option.
Depends on: 221851
Whiteboard: DUPEME
First, sorry if i posted on a wrong place.
This Option tags problem still appears on FF 3.0.6

  <option selected="selected">Saab</option>

On first load its appears Saab as default selected then i change
<option selected="selected">Mercedes</option> and do a refresh
but it shows in FF Saab still as default but in the html source
its selected Mercedes.
That's not this bug, and in fact is the designed behavior.  Reloading preserves form values.  Please take that discussion elsewhere, since it's not related to this bug.
You need to log in before you can comment on or make changes to this bug.