diff --git a/js/utils/gestures.js b/js/utils/gestures.js index 99b48aa4480..65e61f31fc1 100644 --- a/js/utils/gestures.js +++ b/js/utils/gestures.js @@ -1030,6 +1030,7 @@ // we trigger the hold event this.timer = setTimeout(function() { if(ionic.Gestures.detection.current.name == 'hold') { + ionic.tap.cancelClick(); inst.trigger('hold', ev); } }, inst.options.hold_timeout); @@ -1088,8 +1089,9 @@ // do a single tap if(!did_doubletap || inst.options.tap_always) { + ionic.tap.cancelClick(); ionic.Gestures.detection.current.name = 'tap'; - inst.trigger(ionic.Gestures.detection.current.name, ev); + inst.trigger('tap', ev); } } } diff --git a/js/utils/tap.js b/js/utils/tap.js index 414495e1d0b..a6eaf1a295a 100644 --- a/js/utils/tap.js +++ b/js/utils/tap.js @@ -239,6 +239,12 @@ ionic.tap = { setTolerance: function(releaseTolerance, releaseButtonTolerance) { TAP_RELEASE_TOLERANCE = releaseTolerance; TAP_RELEASE_BUTTON_TOLERANCE = releaseButtonTolerance; + }, + + cancelClick: function() { + // used to cancel any simulated clicks which may happen on a touchend/mouseup + // gestures uses this method within its tap and hold events + tapPointerMoved = true; } };