From 57e857fc3f19c110bd22a8e805fe3b79bf874383 Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Thu, 9 May 2013 08:39:48 -0400 Subject: [PATCH] Taphold: fix new option to supress tap per comments on pr #5980 --- js/events/touch.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/events/touch.js b/js/events/touch.js index 141a9c1d077..51a3ddf2dd9 100644 --- a/js/events/touch.js +++ b/js/events/touch.js @@ -110,7 +110,7 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch" // ONLY trigger a 'tap' event if the start target is // the same as the stop target. - if ( $.event.special.tap.emitTapOnTaphold && !isTaphold && origTarget === event.target ) { + if ( !isTaphold && origTarget === event.target ) { triggerCustomEvent( thisObject, "tap", event ); } } @@ -120,7 +120,9 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch" $document.bind( "vmousecancel", clearTapHandlers ); timer = setTimeout( function() { - isTaphold = true; + if( $.event.special.tap.emitTapOnTaphold ) { + isTaphold = true; + } triggerCustomEvent( thisObject, "taphold", $.Event( "taphold", { target: origTarget } ) ); }, $.event.special.tap.tapholdThreshold ); });