You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In previous versions of StylishSelect, in particular 0.4.1, the defaultText parameter was respected, but no longer appears to be. I've created a Gist, copied from the included index.html to demonstrate. I attempted to debug and it appears that the default options, followed by the merged options, are overridden when the selected attribute is fetched from select element in the DOM.
As I understand it the selected element (the attribute of the form <option selected="selected" value="foo">Text!</option>) is meant to be the only element that overrides defaultText but it appears that elements selected at DOM ready time are viewed as selected which throws this off. I attempted a patch but could not fixup lines 125-128 since the first element .is(":selected") returns true if there is no selected="selected" element in the options list.
Is there another means of determining if the DOM actually contains an explicitly selected element in a select's options list? If so can we patch this up to respect defaultText?
The text was updated successfully, but these errors were encountered:
In previous versions of StylishSelect, in particular 0.4.1, the defaultText parameter was respected, but no longer appears to be. I've created a Gist, copied from the included
index.html
to demonstrate. I attempted to debug and it appears that the default options, followed by the merged options, are overridden when the selected attribute is fetched from select element in the DOM.As I understand it the selected element (the attribute of the form
<option selected="selected" value="foo">Text!</option>
) is meant to be the only element that overridesdefaultText
but it appears that elements selected at DOM ready time are viewed as selected which throws this off. I attempted a patch but could not fixup lines 125-128 since the first element.is(":selected")
returns true if there is noselected="selected"
element in the options list.Is there another means of determining if the DOM actually contains an explicitly selected element in a select's options list? If so can we patch this up to respect defaultText?
The text was updated successfully, but these errors were encountered: