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
Visit the above page in IE11 and you'll see two select boxes, both with empty initial values which is what we expect.
Click the show button to display two more select boxes (identical to the first two, but inside a v-if) and they will have initial values of AAA, which is bad.
Also the select element which is inside the test component gets an initial value of AAA. It seems that the select element needs to be in the DOM during page load for it work as expected. Anything added dynamically (inside a v-if or through component templates) gets an initial value which takes it out of sync of the underlying model.
I believe this happens only on Windows 8 & 10 (the select element is different from older versions of Windows).
The text was updated successfully, but these errors were encountered:
fergaldoyle
changed the title
Internet Explorer select element inside v-if displays first option by default
Internet Explorer dynamically added select elements display first option by default
May 31, 2016
Solved the issue. From what I can see it doesn't break existing functionality.
A separate but related issue (in IE) is when a select element is moved (either the element itself or when it's a descendant of a moved element) within the DOM, even with the above code change, it will reset and present the same issue as above (displaying the first option instead of a blank).
e.g:
<divid="move"><label> Test
<selectv-model="selected">...</select></label></div><divid="dest"></div>
http://codepen.io/anon/pen/gMbPrj
Visit the above page in IE11 and you'll see two select boxes, both with empty initial values which is what we expect.
Click the
show
button to display two more select boxes (identical to the first two, but inside a v-if) and they will have initial values ofAAA
, which is bad.Also the select element which is inside the
test
component gets an initial value ofAAA
. It seems that the select element needs to be in the DOM during page load for it work as expected. Anything added dynamically (inside a v-if or through component templates) gets an initial value which takes it out of sync of the underlying model.I believe this happens only on Windows 8 & 10 (the select element is different from older versions of Windows).
The text was updated successfully, but these errors were encountered: