Material: Click Hijack doesn't work when jQuery is loaded

Created on 15 Apr 2015  路  4Comments  路  Source: angular/material

Hi,

In recent 0.9 release, I noticed that md-button ripple effect's behavior has changed.

0.9: the attached ng-click handler will be fired after the ripple animation ends
0.8: the attached ng-click handler will be fired when the ripple animation begin
Currently this behavior can only happen on IOS (Android Not Tested), desktop browser is fine.

Most helpful comment

This issue seems related to jQuery. If I remove jQuery, even in IOS, it's also fine.

All 4 comments

This issue seems related to jQuery. If I remove jQuery, even in IOS, it's also fine.

The further investigation shows it seems related to click hijack. angular material will stop hijack click when jQuery is used. As a result, click delay will happen. It might not be directly related to ripple effect.

Looks like click delay is a hard problem. fastclick (https://github.com/ftlabs/fastclick) is most popular library to solve this problem across different kinds of touch devices.

Maybe it doesn't make sense that angular material will repeat these efforts.

In my testing, this only happens when jQuery is loaded before Angular & Angular Material. When loaded afterward, the 300ms delay is gone and things appear to function as normal.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sbondor picture sbondor  路  3Comments

diogodomanski picture diogodomanski  路  3Comments

PeerInfinity picture PeerInfinity  路  3Comments

ghost picture ghost  路  3Comments

nikhildev picture nikhildev  路  3Comments