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
Description of the bug:
When a bound <select> value is set to something that doesn't match any options, it is ignored, and first <option> is selected instead.
Note:
The current behavior is correct in a situation where there had been a selected <option>, but it was removed from the DOM. In that case, we should select the first option. However, I think this should not be the case when ractive.set() is called explicitly.
The text was updated successfully, but these errors were encountered:
I think this is more or less forced by browsers now. Firefox as of mid-last-year (at least that's the first encounter I had with it) and Chrome as of 49 don't seem to let you have a select with options and no selected value. There's a strong chance I've missed something though 😄
Description of the bug:
When a bound
<select>
value is set to something that doesn't match any options, it is ignored, and first<option>
is selected instead.Related: http://stackoverflow.com/questions/36409229/using-ractive-js-how-do-you-unselect-a-selected-select-box
Versions affected:
both 0.7.3 (
<select>
and model go out of sync) and edge (model value replaced by first<option>
)Reproduction:
http://jsfiddle.net/7bx6pc8h/1/
Code:
Note:
The current behavior is correct in a situation where there had been a selected
<option>
, but it was removed from the DOM. In that case, we should select the first option. However, I think this should not be the case whenractive.set()
is called explicitly.The text was updated successfully, but these errors were encountered: