Skip to content

How to implement long-press and drag on mobile devices #3177

Closed

Description

@taosimple

On mobile devices, touch swipe gestures and drag gestures conflict with each other. Therefore, I want to implement the function of triggering the drag event after a long press, similar to long-pressing an icon to drag it on the mobile phone desktop. The problem I'm encountering now is that after pressing, I activate dragging through grid.enableMove(true, currentElement);, but I have to release the touch and then press again to drag, which makes the operation discontinuous. I wonder if there's a way to achieve a more instinctive interaction like this.

Activity

  1. adumesny commented on Oct 29, 2025

    @adumesny
    Member

    yeah probably the way to do this is to have the grid readOnly:true on mobile (so you can swipe to scroll and interact with content) and use long press to turn into edit mode (drag and resize). but then need gesture to leave edit mode (single click and release ?)

    that could be added for the right donation.

  2. adumesny commented on Aug 30, 2026

    @adumesny
    Member

    fixed in next release! don't forget to donate if you find this lib useful

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions