Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

paper-radio-button nested in custom element goes unnoticed #65

Closed
AimForNaN opened this issue Aug 5, 2016 · 1 comment
Closed

paper-radio-button nested in custom element goes unnoticed #65

AimForNaN opened this issue Aug 5, 2016 · 1 comment

Comments

@AimForNaN
Copy link

AimForNaN commented Aug 5, 2016

Problem

I have a paper-radio-button nested within a custom element. I expected the button to be picked up by paper-radio-group, but it was not caught. I've been able to narrow it down to the call to queryDistributedElements() in _updateItems() of the IronSelectableBehavior (https://github.com/PolymerElements/iron-selector/blob/master/iron-selectable.html#L272). Changing queryDistributedElements() to querySelectorAll() would quickly solve the issue, but I know IronSelectableBehavior is used in more than one place and that might have undesirable effects.

I have made a custom element mimicking paper-radio-group, applying the aforementioned solution to its _updateItems() method, and it works.

Live Demo

https://jsfiddle.net/vbkpmat4/

As you can see, the third item is not considered part of the list.

Browsers Affected

All.

@notwaldorf
Copy link
Contributor

notwaldorf commented Aug 5, 2016

Yeah, unfortunately this is a known limitation of iron-selector: PolymerElements/iron-selector#42 😰

Closing this as a duplicate of that issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants