Jump to content
Search Community

Autoscrolling is lagging in safari

Makssshow test
Moderator Tag

Recommended Posts

I don't see anything unexpected, @Makssshow. Can you elaborate? I looked on my iPhone and iPad. Is this a GSAP question or are you asking for general performance audit help? We really try to keep these forums focused on GSAP-specific questions since we don't have the resources to provide free general consulting. 

Link to comment
Share on other sites

I'm afraid we don't have the capacity to do performance audits, but a few points.
 

  • The first video you linked to was scrolling in codepen - this isn't going to be an accurate representation as it's in an iframe and codepen does all sorts of jazz, so it's hard to debug in that set up.
  • You're animating layout properties, top, left, bottom etc. This is very bad for performance and will cause jerky repaints and layout reflows.
  • You're animating transforms too, but like this for some reason - transform: "translateY(0%)" - no need! You can just say y: 0

 

Link to comment
Share on other sites

Also, just to be clear, it's completely normal for there to be a gap in time between when you take your finger off the screen and when the snapping occurs. ScrollTrigger must wait until "scroll" events stop being dispatched for a certain amount of time before considering the scroll "ended", otherwise it might interrupt scrolling and jump into action too soon, especially on desktop devices that can be scrolled in many ways (mouse wheel, touchpad, dragging the scrollbar, tapping the down/up arrow or space bar, etc.) 

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