-
Notifications
You must be signed in to change notification settings - Fork 81
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
Iron label seems to create two values in the serialization. #216
Comments
Maybe related #205 |
I think the check for more elements should be on shadowRoot on this line:
https://github.com/PolymerElements/iron-form/blob/master/iron-form.html#L373 The root element appears to be both either the light dom or the shadow root. The iron-labels have this property so when I wrap an input it gets loaded twice, I think it is in the light dom in iron-label, so it is a child of the form element and then picked up again as the child of the label element, creating double entries in values. Here you can see the root property in polymer source is doc'ed as HTMLElement or ShadowRoot. https://github.com/Polymer/polymer/blob/master/lib/mixins/element-mixin.html#L557
I'm not experienced enough with polymer to know what to do here. Is changing root to shadowRoot an adequate change here? |
I don't think it should be traversing shadow at all. There is some brief discussion in the other issue about this, but I think it could do with more input. |
Thinking more about it... if or if not the shadowdom should be traversed I think is out of the scope of this issue other than changing that line to find any inputs that wouldn't be found otherwise. The original intention was to just get any inputs not collected already not to collect them twice I think this is just a bug. |
Description
The
iron-form
element serializes two values in an array when wrapped an input withiron-label
.Expected outcome
Only 1 String value should be in the serialization for the input's name.
Actual outcome
An array of 2 Strings is in the serialization for the input's name.
Live Demo
https://jsbin.com/kohumos/edit?html,output
Steps to reproduce
Browsers Affected
The text was updated successfully, but these errors were encountered: