How prevent click in event press Gestures Ionic2?

I’m trying to implement a press option on a button that already has a click event.

Is it possible to avoid click if the press occurs?

For in my tests the click is triggered even if the press has happened before. I tried to include event.preventDefault() in press event.

Example in Plunker

I had the same problem. When I launched a popover from the press event, the event didn’t fall down to the click handler. But on all other cases it did. In those cases, I use tap instead of click:


<button ion-button full  color="primary" (press)="onPress($event)" (tap)="onTap()">click me</button>


onTap() {
onPress($event) {
1 Like

Thank you, that solved my problem!

If you are interested in replying too, I opened a post on this also in stackoverflow before receiving your answer here!