Ionic-framework: (click) on ion-card or div has 300ms delay

Created on 2 Jul 2016  路  2Comments  路  Source: ionic-team/ionic-framework

Short description of the problem:

Performing a (click) on an ion-card or a div has a 300 ms delay on iPhone, whereas the same (click) on a button does not have the delay.

What behavior are you expecting?

Performing a (click) on a card or other non-button and non-hyperlink elements like a div, would not have the 300ms delay on the iPhone.

Example:

<!-- ion-card (click) has the infamous 300ms delay -->
<ion-card (click)="OpenListing(listing)"> ... </ion-card>

<!-- button (click) is instant, without the 300 ms delay -->
<button (click)="OpenListing(listing)"> ... </button>

Which Ionic Version? 1.x or 2.x
2.beta.10

Run ionic info from terminal/cmd prompt: (paste output below)

Cordova CLI: Not installed
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: 1.8.5 
ios-sim version: 3.1.1 
OS: Mac OS X El Capitan
Node Version: v0.12.7
Xcode version: Xcode 7.3.1 Build version 7D1014

Most helpful comment

@tones411 use the tappable attribute:

<ion-card (click)="OpenListing(listing)" tappable> ... </ion-card>

try to use button/a whenever it's possible though

All 2 comments

@tones411 use the tappable attribute:

<ion-card (click)="OpenListing(listing)" tappable> ... </ion-card>

try to use button/a whenever it's possible though

Perfect. Thank you!

Was this page helpful?
0 / 5 - 0 ratings