Skip to content
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

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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants