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)?
enclose select in form attribute and it will work.
and
Try to disable
autocomplete
attribute of select input ... sometimes browser ignoreselect
because of thatThis is my solution:
I just put that at the top of the page (with appropriate id set), and it works for me. Replacing the getElementById with a loop over all selects on the page, I leave as an exercise for the reader ;).
autocomplete wasn't working for me either.
This is the javscript fix written in jquery that i use:
Add
autocomplete="off"
HTML attribute to every select tag. (source: https://stackoverflow.com/a/8258154/260080)This fixes the ODD behavior in FireFox.
use .prop() instead of .attr()