The behaviour I see is that when first rendered there is no value attribute, but after any update to the dom, the attribute is set correctly (to <option value=""> or <option value> (but not in IE11)). Looking at the source it seems to me that this is one of those cases where there is a distinction between setting a dom attribute and setting a dom property. The problem is not in the VirtualDom but in the Html library. The "value" attribute is defined as a stringProperty while it should be an attribute (at least for the option tag) so it is set with "setAttribute()".
https://github.com/elm-lang/html/blob/master/properties-vs-attributes.md On Thursday, 9 February 2017 12:38:19 UTC-3, Brian Marick wrote: > > I have an app with multiple tabs. (See below.) The user clicks on a tab to > navigate (using elm-lang/navigation) to another page. The “home” page has a > select box on it, containing this: > > <select> > <option value=“”>Any</option> > <option value=“bovine”>bovine</option> > <option value=“equine”>equine</option> > </select> > > (As shown by Firefox inspector.) After changing the page and immediately > clicking to go back to the home page tab, the inspector shows that the > first option has changed to this: > > <option>Any</option> > > That only happens when the value is an empty string - adding as little as > a space makes the problem go away. > > Is this a bug? > > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
