Jump to content
Search Community

ScrollSmoother breaks sticky objects

taropaa test
Moderator Tag

Recommended Posts

Hi, 

I am using ScrollSmoother.js on my website. I have sticky elements inside the main wrapper, which I cannot place outside. How can I mitigate this?


Thank you, 

Adrian

Link to comment
Share on other sites

Hi there, sorry to say there's not really anything you can do to mitigate it.

It's not down to GSAP persay, more that you can't have fixed elements inside a transformed container (like the ScrollSmoother container). It's a web platform thing that we can't change.

 

The options are either move the elements outside the scroller in the DOM, (or reparent them on interaction if they're modals?) or use a different solution like Lenis, Lenis doesn't smooth all inputs though, soif someone drags the scrollbar or tabs down the page it won't be smooth. It's also a third party solution so we can't speak for compatibility.

Sorry that you've run into this and good luck getting it fixed, happy to answer any questions you may have.

 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi Cassie, Thank you for getting back to me on this. Like you said I may have to come up with a GSAP-friendly way to deal with sticky elements. If I find a universally viable solution I will post it here. :) 

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