Open Bug 389601 Opened 15 years ago Updated 6 years ago
Select: delete option tags and refresh selects wrong option
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:22.214.171.124) Gecko/20070713 Firefox/126.96.36.199 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:188.8.131.52) Gecko/20070713 Firefox/184.108.40.206 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: http://trac.dojotoolkit.org/ticket/3858
Component: General → Layout: Form Controls
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
First, sorry if i posted on a wrong place. This Option tags problem still appears on FF 3.0.6 Ex: <select> <option>Volvo</option> <option selected="selected">Saab</option> <option>Mercedes</option> <option>Audi</option> </select> 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.