Avoid default behavior

This commit is contained in:
Haocen Xu 2018-07-06 15:25:26 -04:00
parent 616dade81c
commit 9c204d9bbe

View file

@ -136,6 +136,7 @@ Utils = {
});
$(document).on('touchend', selector, function(e) {
if (touchStart && lastTouch && Utils.calculateTouchDistance(touchStart, lastTouch) <= 20) {
e.preventDefault();
const clickEvent = document.createEvent('MouseEvents');
clickEvent.initEvent('click', true, true);
e.target.dispatchEvent(clickEvent);