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

Can't change index from tap event #114

Open
43081j opened this issue Mar 10, 2016 · 1 comment
Open

Can't change index from tap event #114

43081j opened this issue Mar 10, 2016 · 1 comment

Comments

@43081j
Copy link
Contributor

43081j commented Mar 10, 2016

Example:
http://plnkr.co/edit/pIcvOOwpwsITthrnlM8R?p=preview

Steps:

  • Click the button
  • It should select the second item but is forced back to index 0

If you have something inside an iron-selectable child which listens on tap event, it is incapable of setting the selected item.

This seems to be because iron-selectable catches any tap events and sets the selected item to the child which the event came from.

If you put the increment in the example inside this.async(...), it will work because the iron-selectable handler runs first.

@bicknellr
Copy link
Contributor

As a temporary workaround, you can call stopPropagation on the tap event.

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

No branches or pull requests

2 participants