If you change a dropdown and refresh the page, Firefox seems to ignore the selected attribute.
<option selected="selected" value="Test">Test</option>
It will in fact select the option you had previously selected (before the refresh). This ends up being a problem for me since there is an event triggered on the dropdown which changes other things. Is there a way to make firefox stop this behavior (other than firing another event when the page loads)?
Neither
autocomplete="off"
or placing it inside aform
works for me.What worked was to only use the attribute selected with no "value" like this:
so either it renders
<option selected>...</option>
, or just<option>...</option>
In this case this worked both for Chrome and Firefox.
I was using
.attr()
instead of.prop()