diff --git a/src/wScratchPad.js b/src/wScratchPad.js index 649de29..ca423e2 100644 --- a/src/wScratchPad.js +++ b/src/wScratchPad.js @@ -285,7 +285,7 @@ }; $.fn.bindMobileEvents = function () { - $(this).on('touchstart touchmove touchend touchcancel', function (event) { + var eventFunc = function (event) { var touches = (event.changedTouches || event.originalEvent.targetTouches), first = touches[0], type = ''; @@ -315,5 +315,8 @@ first.target.dispatchEvent(simulatedEvent); }); + $(this).on('touchstart touchmove touchcancel', eventFunc).each(function () { + this.addEventListener('touchend', eventFunc); + }); }; -})(jQuery); \ No newline at end of file +})(jQuery);