Skip to content

Feature suggestion: handle drag event #24

Description

@appeltonen

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions