Closed ghost closed 8 years ago
Heya,
It seems as if you are looking for the logical target of the event. Based on our model, we suggest that you use Polymer.dom(event).localTarget
to access the paper-icon-button
. Here's a JSBin I cooked up to show an example.
If you tap on the button in the center (within the bounds of the icon) it will return the iron-icon element as the target in the returned event.
Expected Outcome
The
on-tap
event should always return thepaper-icon-button
element in the target attribute.Actual Outcome
on-tap
events will return theiron-icon
element when tapped within theiron-icon
bounds. It will return thepaper-icon-button
element when tapped within the bounds of the button, but outside the bounds of the icon in the button (along the edges). This creates an issue when attempting to have a reliable method of reading the button's id on anon-tap
event.Steps to Reproduce
paper-icon-button
elementon-tap
event attribute to a functionconsole.log
the value of the function'sevent.target.id
parameteron-tap
event occurs it will log either the id given to the button, oricon