selected on <select><option> doesn't seem to work right on riot 3.0.4 #2164

Closed
wes opened this Issue Dec 15, 2016 · 1 comment

Projects

None yet

3 participants

@wes
wes commented Dec 15, 2016 edited

selected on select and option option doesn't seem to work right on riot 3.0.4

The html seems to be updated correctly, but something is preventing the select menu to choose correctly?

Riot 3 Fiddle (Not selecting the right option)
http://jsfiddle.net/wf7bkvur/144/

Riot 2 Fiddle (Works correctly Here)
http://jsfiddle.net/wf7bkvur/145/

  1. On which browser/OS does the issue appear?

Chrome 54 / Mac Sierra

@joobus
joobus commented Dec 16, 2016

I played with your fiddle for a while, and every so often I would find some permutation where it would appear to work, but ultimately this is what I found: http://jsfiddle.net/wf7bkvur/152/

The selected tag would only be respected if the selected option was the last option in the option list, otherwise the first option would be shown in the select, even though it did not have the selected attribute. I checked the html in the dev tools and each option that I set as true would get the same selected="selected" attribute, but only if the last option was selected would the select box actually show it as selected.

@GianlucaGuarini GianlucaGuarini added a commit that closed this issue Dec 18, 2016
@GianlucaGuarini GianlucaGuarini closes #2164 f9ca05f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment