Jump to content
Search Community

2 way scrolling jitter with Draggable

tallwhitey test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

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