ngryman / jquery.finger

:v: jQuery touch & gestures, fingers in the nose.
https://ngryman.sh/jquery.finger/
MIT License
423 stars 66 forks source link

Tap Event Fired On Desktop #38

Open bassmanpaul opened 9 years ago

bassmanpaul commented 9 years ago

Hi, Quick query; Is the tap event meant to fire the click event on desktops as well? As this throws a spanner in the works for my following scenario:

$( document ).on( 'dblclick', '#btn', function( ev )
{
       // Fire My Logic Off
});

$( document ).on( 'tap', '#btn', function( ev )
{
       $( this ).trigger( 'dblclick' );
});

What I expect:

What actually happens:

So basically my logic fires a click early. This happens in Webkit & FF (not IE11). I've tried various ev.preventDefault(); combinations as well to no avail.

http://jsfiddle.net/3cd9wz54/ Shows the tap & click being fired.

Could you shed some light on the situation please?

Regards,

Paul