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 was archived by the owner on Dec 28, 2024. It is now read-only.
The iron-select event is not always fired when using dom-repeat to list items because dom-repeat recycles DOM nodes. Say we have a list where the first item is selected. Then we unshift an item to the front of the list. The DOM contents are changed but the DOM nodes are reused. No change is detected because selectedItem in the iron-selectable behavior is pointing to the recycled DOM node.
Either the selection changes to remain in the first position and a iron-select event is fired or the first item remains selected when bumped to the second position.
Description
The
iron-selectevent is not always fired when usingdom-repeatto list items becausedom-repeatrecycles DOM nodes. Say we have a list where the first item is selected. Then we unshift an item to the front of the list. The DOM contents are changed but the DOM nodes are reused. No change is detected becauseselectedItemin theiron-selectablebehavior is pointing to the recycled DOM node.Related to #130 and solvable by Polymer/polymer#4363
Expected outcome
Either the selection changes to remain in the first position and a
iron-selectevent is fired or the first item remains selected when bumped to the second position.Actual outcome
No change events are emitted.
Live Demo
http://jsbin.com/menudapoha/edit?html,console,output
Steps to reproduce
Browsers Affected
Likely all browsers but I only tested Chrome.