diff --git a/external/taphold.js b/external/taphold.js index cf16e280..1a76e183 100644 --- a/external/taphold.js +++ b/external/taphold.js @@ -106,12 +106,16 @@ $(this).bind((touchSupported ? "touchstart" : "mousedown"), data, startHandler) .bind((touchSupported ? "touchend" : "mouseup"), stopHandler) .bind((touchSupported ? "touchmove" : "mouseleave"), leaveHandler); + if(touchSupported) + $(this).bind("touchcancel", leaveHandler); }, teardown: function(namespaces) { $(this).unbind((touchSupported ? "touchstart" : "mousedown"), startHandler) .unbind((touchSupported ? "touchend" : "mouseup"), stopHandler) .unbind((touchSupported ? "touchmove" : "mouseleave"), leaveHandler); + if(touchSupported) + $(this).bind("touchcancel", leaveHandler); } }; })(jQuery);