Jump to content
Search Community

Navigation in mixed scrolling ( Horizontal + Vertical )

vdev test
Moderator Tag

Recommended Posts

  • 7 months later...

hi, hope it's ok to tag onto the end of this. I am using the example above but have noticed there is a weird glitch when navigating from the first horizontal panel to any other panel after it (a white section appears briefly at the bottom) AND when navigating from panel 5 to any before (a white section appears briefly at the top). I have tried playing around with the css etc but get rid of it. Any idea what is causing this? Thanks :)

 

Link to comment
Share on other sites

Working on Mac OS 12.6.

 

Latest Chrome.

 

It happens on embedded codepen and codepen page and also the link you shared without iframes.

Also happens on my iPhone in Safari and Chrome.

 

It also happens on the project which I'm working on which is why I came back to check the codepen to make sure it wasn't something I had done.

 

Not sure what I can do further to show you - the video shows it best.

 

Thanks :)

Link to comment
Share on other sites

Hi,

 

Yeah, we just need as much information about browser and OS when seeing issues like this that we can't reproduce on our devices, that's all.

 

I'll ping @GreenSock so He can take a look at this, since I'm not able to reproduce and He might know about this and tell us the culprit, if any.

 

Please stand by.

 

Happy Tweening!

Link to comment
Share on other sites

It's very difficult for me to see, but I believe the issue has to do with the fact that the scrollTo tween is altering the scroll position but the browser takes a few milliseconds to fire the "scroll" event, and most browsers handle scrolling on a separate thread (not synchronized). Here's a workaround where I invalidate a cached value in an onStart and then call ScrollTrigger.update() in an onUpdate on the tween:

See the Pen rNKzZdj?editors=0010 by GreenSock (@GreenSock) on CodePen

 

I've updated the next release to work around this automatically. You can preview that at:

(You may need to clear your cache)

 

Better? 

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