Closed swalkinshaw closed 7 years ago
@swalkinshaw Thanks for the PR and sorry for the long time silence. With the hope that you are still interested, could you elaborate on the expectation of the example you posted? (Sorry for my lack of knowledge)
Sure, the example I showed displays what can happen when selected
is on every option
element.
There's 3 dropdowns:
1: incorrect. The first option has selected=true
but it's overruled by the last one with selected=false
.
2: correct. Only one element has the selected
attr.
This PR just skips setting selected
on all options which is not really valid.
@swalkinshaw
Thanks for taking the effort explaining this after such a long period of time. I would be really happy to take this PR.
Closing in favour of https://github.com/jkk/formative/pull/49
The
selected
attribute for anoption
element was always being set to eithertrue
orfalse
. This breaks the selected attribute rendering (at least in Chrome). Only one option should ever have theselected
attribute.See http://jsbin.com/suwojito/1/
Output: