You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
Paper radio button names that evaluate to false can be deselected without allow-empty-selection
This becomes significant when the name is bound to index in a template dom-repeat.
Expected outcome
It should be impossible to deselect the a radio button, even if it is the only one selected.
Actual outcome
It is possible to deselect radio buttons with name set to "0".
I think it's because the check below (in paper-radio-group.html) fails when this.selected = 0 or "0", which makes the code feel its fine to toggle the radio button.
When observing "selected" it normal returns a newValue of empty string ('') when deselected. However when the name is "0" then "0" is returned as newValue.
Description
Paper radio button names that evaluate to false can be deselected without allow-empty-selection
This becomes significant when the name is bound to index in a template dom-repeat.
Expected outcome
It should be impossible to deselect the a radio button, even if it is the only one selected.
Actual outcome
It is possible to deselect radio buttons with name set to "0".
I think it's because the check below (in paper-radio-group.html) fails when this.selected = 0 or "0", which makes the code feel its fine to toggle the radio button.
Live Demo
https://jsbin.com/pocisukaqe/edit?html,css,output
(also contains a hacky solution)
Steps to reproduce
paper-radio-group
with a fewpaper-radio-button
s on a page.The text was updated successfully, but these errors were encountered: