New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Comments

Projects
None yet
3 participants
@wes

wes commented Dec 15, 2016

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

This comment has been minimized.

Show comment
Hide comment
@joobus

joobus 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.

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 added a commit that referenced this issue Dec 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment