Jump to content
Search Community

Draggable y conflict with Window scrollY

fb-nyc test
Moderator Tag

Recommended Posts

I couldn't replicate this issue on codepen, so for now, I'm hoping that there is something obvious that I'm missing in regards to Draggable settings.

 

I have a Draggable container that scrolls its inner object perfectly when the window scrollY position is 0. 

 

But when the browser scrolls down and the window scrollY property is more than 0, the Draggable object (onDrag) jumps up to the window scrollY 0 position instead of maintaining its relative position inside of the Draggable container.

 

Do I need to reset the y position so that the scrolling object maintains its relative position within the Draggable container instead of the window scrollY position?

 

Thanks,

Frank

Link to comment
Share on other sites

Hm, I wonder if you just have an old version of Draggable. I know at one point there was a bug that sounds kinda like what you're describing, but it was fixed a few releases back. Please make sure you've got the latest version (3.2.6) and let us know if that resolves things. If not, it's gonna be really tough to troubleshoot blind so if you could send us some kind of reduced test case we'd love to take a peek. 👍

  • Like 1
Link to comment
Share on other sites

I just added the latest version, but the issue is still there.
Below is a test link:

https://ms85.holdrr.com/timeline/era-1

 

The dragger is exposed in the console.

 

 

**I just realized that I only updated gsap-bonus.tgz but I did not update using npm install, so I was still using 3.0.1!

Everything is fine using 3.2.6!

 

Thanks!

Frank

Edited by fb-nyc
  • 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...