-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
Description
Off-click fires when touch device user ends target element drag. I suggest you add a touchmove event handler
document.addEventListener("touchmove", touchMoveHandler, true);
and variable
var touchDrag = false;
Then add
function touchMoveHandler(event) {
touchDrag = true;
}
And at the beginning of offClickEventHandler
if( touchDrag ) {
touchDrag = false;
return;
}
This would prevent off-click from firing when user was dragging target element.