Closed Bug 717595 Opened 14 years ago Closed 13 years ago

firefox no longer supports modifying "selected" attribute via javascript/jquery

Categories

(Firefox :: Untriaged, defect)

8 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jshado_1, Unassigned, NeedInfo)

References

()

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 Build ID: 20111220165912 Steps to reproduce: Previous to Ffx8, the following pair worked fine: $("select > option:first").attr("selected","selected"); $("select > option:first").removeAttr("selected"); Actual results: The select element gets stuck on the first option: the actual code selected="selected" is removed, yet if you select a different option, it doesn't change. You (as a user) have to manually select the first option, then go back and select whichever one you want. If you don't manually select the first option first, you cannot select a different option. Expected results: After removing the "selected" attribute, the select element should behave as if there was no hard-coded selected="selected". Here is an example of the issue: http://jsfiddle.net/jshado1/EkDdB/ Click the button "click to fade in" Try to select any option but the first
I have tested this in Ffx 4 thru 9.0.1 on Mac and Win, and the issue first appears in Ffx8 (and continues thru v9.0.1). This issue is isolated to Firefox (tested in Safari/Chrome and Opera for Mac & Win, and IE on Win).
Summary: firefox no longer supports attribute "selected" via javascript/jquery → firefox no longer supports modifying "selected" attribute via javascript/jquery
This appears to work fine now in Firefox 19. Jacob, thanks for reporting it and I'm sorry that this issue didn't get a response earlier. But, at least appears to be fixed now!
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
I'm having the same problem in 40.0a2 version (24/06/2015), some of you are acotecendo this error?
Flags: needinfo?(jshado_1)
You need to log in before you can comment on or make changes to this bug.