Jump to content
GreenSock

demiava

ScrollTrigger during horizontal scroll border is hidden under scrollbar

Moderator Tag
Go to solution Solved by GreenSock,

Recommended Posts

I have a fake horizontal scroll. Looks like .pin-spacer{} adds padding in such a way that the border on the right is being pushed away and hidden off the screen. Can't really understand what am I doing wrong.

See the Pen zYJzZvG by demiavaliani (@demiavaliani) on CodePen

Link to comment
Share on other sites

  • Solution

Ah, that's because in it's normal state (without ScrollTrigger/pinning), your page has no scrollbar. So when ScrollTrigger was calculating the width of the pinSpacer, it used that width but then the pinSpacing creates a scrollbar. The next release should have a fix for that (you can preview it at https://assets.codepen.io/16327/ScrollTrigger.min.js) but in the meantime it should be as simple as setting overflow-y: scroll on your <body>. 

 

Here's a version with the beta file: 

See the Pen ExeXMJY by GreenSock (@GreenSock) on CodePen

  • Like 1
Link to comment
Share on other sites

Ah, makes sense, thanks a lot. And when should we expected the next release?

Link to comment
Share on other sites

Hi,

 

Unfortunately we don't have an ETA for the next release, so you can use the link Jack provided until 3.11.5 is released.

 

If you need the NPM files let us know.

 

Happy Tweennig!

  • Thanks 1
Link to comment
Share on other sites

I actually need NPM, yeah :)

Link to comment
Share on other sites

9 hours ago, demiava said:

I actually need NPM, yeah :)

I sent you a DM with details about how to get that. 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

FYI, 3.11.5 is officially released. 🥳

 

Side note: JSDelivr created a special page for GSAP on their CDN (in case you're looking for CDN links). 

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