Jump to content

Pete K

"Hold for a moment and then drag" issue ( mobile only )

Recommended Posts


The issue is this. I made a simple menu, that is being expanded after pressing the button.

Then a user is supposed to drag the button ( while still pressing/touching it) onto the desired position.

On a desktop - it all works as intended. On mobile - it goes like this ...

Once you press/touch the button  (and unless you move your finger almost instantly) the draggable object gets disabled.

As far as I understand the issue it is related to some native events that get triggered when you press the screen for longer. 

Has anyone got any idea hot to prevent this from happening ??? 

Thanks for your help in advance!

Link to comment
Share on other sites



Is really hard for us to troubleshoot without a minimal demo. Please do your best to provide one that clearly illustrates the issue you are having.


In the mean time you could try using Draggable's onClick or onPress callbacks to handle your click/touch logic and have a look at the docs for dragClickables and clickableTest.


Happy Tweening!

Link to comment
Share on other sites

Thanks Rodrigo! In case someone runs into the smiliar case I have done the following which seems to be working both on Android and iOS. 

1. I set the main wrapper's touchstart event to "e.preventDefault()". 

2. Then all the press, click and drag events are handled by the gsap plugin only.

3. And the rest works like a charm ... as always!



  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.