Jump to content
GreenSock

tallwhitey

2 way scrolling jitter with Draggable

Recommended Posts

I'm encountering an issue whereby I have a div assigned a draggable {type:"scrollTop"}. Within that div are other elements assigned a Draggable {type:"x"}. 

 

The problem comes when trying to swipe the child elements right and left. It usually triggers on the first attempt, but during any vertical movement, the parent div and all its other elements start to jitter unexpectedly very minutely in the vertical direction. And then the type x elements become difficult to trigger in the horizontal movement again. (all this on mobile android)

 

Things work fine though when I change the parent div to a type:"y".

 

Any ideas what is the cause? and/or solution? 

Link to comment
Share on other sites

Do you have a reduced test case we can peek at? That'd really help. A codepen would be perfect. 

 

Have you thought about simply not applying the scrollTop Draggable on touch devices? Seems unnecessary, right? (since touch devices have built-in drag-scrolling)

 

Have you also tried setting the Draggable's allowNativeTouchScrolling:true (or false) to see if it has any effect?

  • Like 1
Link to comment
Share on other sites

Thanks for the quick response as this seems to be the best forums I've ever come across!

 

And yes the allowNativeScrolling:false seemed to do the trick. So obviously some conflict there.

 

I felt I had to use ScrollTop because I was getting very poor performance on an iphone 6s I was testing. Most likely a result of how my app is setup, but the address bar kept overriding things.

 

Thanks again for the suggestion!

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