Jump to content
Search Community

Can't override the `touchAction` for Draggable in React

Pavel Laptev test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hi! I have the similar problem as in this thread — draggable doesn't work well on androids.

 

In order to fix it I need to override the default draggable `touchAction` which is `manipulation` but I can't do it with react. Looks like it's just ignore my override. What am I doing wrong? Here is the demo — https://codesandbox.io/s/gracious-lumiere-ynov4r?file=/src/App.tsx

 

 

 

 

  • Like 1
Link to comment
Share on other sites

  • Solution

Did you try just doing your .set() AFTER you create the Draggable? It looks like you did it BEFORE in your demo. 

 

Also, if you don't want to allow native touch scrolling, setting allowNativeTouchScrolling: false is an option as well (instead of allowEventDefault). 

  • Like 1
Link to comment
Share on other sites

On 8/4/2022 at 6:37 AM, GreenSock said:

Did you try just doing your .set() AFTER you create the Draggable? It looks like you did it BEFORE in your demo. 

 

Also, if you don't want to allow native touch scrolling, setting allowNativeTouchScrolling: false is an option as well (instead of allowEventDefault). 

Thank you!

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.
×
×
  • Create New...