[Tried and tested] I checked the jQuery Mobile implementation. They fire the tap event after taphold each time on vmouseup.
The workaround will not trigger the tap event if taphold has been fired . Create a custom event or modify the source as you need, as follows:
$.event.special.tap = { tapholdThreshold: 750, setup: function() { var thisObject = this, $this = $( thisObject ); $this.bind( "vmousedown", function( event ) { if ( event.which && event.which !== 1 ) { return false; } var origTarget = event.target, origEvent = event.originalEvent, tapfired = false, timer; function clearTapTimer() { clearTimeout( timer ); } function clearTapHandlers() { clearTapTimer(); $this.unbind( "vclick", clickHandler ) .unbind( "vmouseup", clearTapTimer ); $( document ).unbind( "vmousecancel", clearTapHandlers ); } function clickHandler( event ) { clearTapHandlers();
Akash Budhia
source share