Hovered-over option gets incorrectly selected when originally selected option is disabled.

RESOLVED DUPLICATE of bug 387406

Status

()

RESOLVED DUPLICATE of bug 387406
8 years ago
5 years ago

People

(Reporter: karlie.spambox+bugzilla, Unassigned)

Tracking

3.6 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15

If the currently selected option in a select is disabled, simply hovering over another options selects it - sort of.  Visually, it looks like the disabled option is still selected, but any form submission will send the incorrectly selected option.

This causes forms to submit with information different from what the user choose.  There has been no work-around found.

Here's some example html:

<select id="state">
<option value="-1" selected="selected" disabled="disabled">- Select a State -</option>
<option value="CA">CA</option>
<option value="CO">CO</option>
<option value="CN">CN</option>
</select>


And some example JavaScript:
var index = document.getElementById("state").selectedIndex;
alert(document.getElementById("state").options[index].text);

Reproducible: Always

Steps to Reproduce:
1. Open a page with the example html above.
2. Run the example javascript.  It will alert the value -1.
3. Click on the select element.
4. Hover over CO and then click somewhere else on the page.  The CO option should be the last option you hovered over before clicking somewhere else.


Actual Results:  
The select continues to appear as if the "Select a State" option is selected.  Run the example JavaScript.  The alerted value will be "CO".

Expected Results:  
The select continues to appear as if the "Select a State" option is selected.  Run the example JavaScript.  The alerted value will be "-1".

This has been reproduced on multiple machines running Firefox.  The same thing happens every time.
Whiteboard: dupeme

Updated

7 years ago
Version: unspecified → 3.6 Branch

Updated

7 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 387406

Updated

5 years ago
Whiteboard: dupeme
You need to log in before you can comment on or make changes to this bug.