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
It's tricky to solve though because of that Chrome hack. I think while the option element is built, it has no children (the text content) and therefore its value is == ''. It's only after the text child is added that the value will be different from ''. I tried changing the comparison to === but it doesn't seem to work; I suppose the value is an empty string by default.
I wonder if that Chrome hack is still necessary. Removing that line makes the test pass.
EDIT: Not sure, but maybe this would work:
if (vnode.tag === "option" && key === "value" && old != null && vnode.dom.value == value) return
The following hyperscript will not set the select option value to ''
Instead, the value of that option will be 'Choose...'
jsbin demo comparing behaviour of plain HTML and Mithril: https://jsbin.com/zoqajeyoso/edit?html,js,output
The text was updated successfully, but these errors were encountered: