Skip to content

Feature suggestion: handle drag event #24

@appeltonen

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions