Jump to content
Search Community

ScrollTrigger Snap issue

Alexey Matlash test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Wussup, GSAP!

I`m experiencing some issues with snapping.
My snap performs very laggy fo no reson. Here is my ST code:
image.png.2b4f2b5dd4f01d61c093f9f586f19db6.png 
Here is an example of this snap performing at chrome mobile- 

 

And this is how it performs on my desktop (Yet another Russian local browser (chromium)). I have the same experience on different browsers including Chrome itself.- 

 

I`d like to say that my code is buggy, but all actual codeOpen demo examples of ScrollTrigger`s snap (from docs) are laggy on my desktop too.

I briefly looked for latest snap related topics and found this post.
https://greensock.com/forums/topic/25479-full-screen-sections/?do=findComment&comment=123493
So @akapowl, you might be interested too. Your demos, where you downgraded ScrollTrigger and GSAP to v3.4.2, works perfectly fine with snapping.


Any other machines I tested works good.
Is there a possibility it`s related to AMD processor I`m using? Or may be it`s Windows Insider program? Dunno. Any ideas what kind of information about my system could help with solving this issue.

P.S. Have no idea, how to mention concrete person at this forum correctly(

Link to comment
Share on other sites

Sorry, I didn`t think that you need any special demo unless that one in the documentation.
UPD: It works fine after update to 3.6.0

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


Here is the video how this demo works:


I also understand that my case (and probably akapowl`s) is full of mistery. And i have no idea how to debug or even reproduce it. All i can do is give you full information of my system. Or even a some kind of teamviewer, so you can take a look how your demo performs at my PC.

Everything I know for now - 3.4.2 has no any difficulties with snapping. but 3.51 does. And it reproduces both via codeOpen and my local Vue project (but only at my PC).

Link to comment
Share on other sites

 

Just to confirm, this indeed looks like what I was experiencing / talking about in this thread

 

 

 

 

 

...but for me it only appeared in combination with codepen.io and Opera.

 

When openening the same setup from a local folder, even in Opera it was all buttery smooth with 3.5.1 (Reverting to 3.4.2 also did the trick for me on codepen, back then.)

 

Edit:

Just now, I notice the same behaviour as back then, on the ScrollTrigger demo-pen above:

In the preview-frame in this window here, it works as its supposed to, as soon as opened on codepen.io, it lags as it does in the video.

 

 

 

 

 

  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...
  • Solution

Would you mind testing the preview of the upcoming release and letting us know if that resolves things for you? https://assets.codepen.io/16327/ScrollTrigger.min.js

 

The issue had to do with a browser bug where it'd misreport the scrollTop/scrollLeft by one pixel. So if ScrollTrigger set it to 125, for example, and then immediately checked it, the browser would report it as 124 which caused ScrollTrigger to stop the snap because it assumed the user was attempting to manually scroll. The latest preview implements a threshold of 2 pixels before making that assumption. 

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

It seems to only affect people who have the screen zoomed. There may be other factors in terms of which browser versions had the browser bug that misreports things. 

 

As for timing, I can't really say at this point. We're working hard on a new plugin that's a highlight of 3.6.0 but it's rather complex. My guess is a few weeks at this point. Rest assured that we're not sitting around delaying things intentionally - we're actively working on this every day. :)

 

Cheers!

Link to comment
Share on other sites

 

15 hours ago, GreenSock said:

we're not sitting around

 I`m sorry, if you found it impolite 😅 I`m 100% sure you are doing your best! Thanks for your time, great lib, awesome plugin ;)
 

15 hours ago, GreenSock said:

It seems to only affect people who have the screen zoomed

Yep, I got 1440p and Windows setting for 125% text and apps scale. And guess what happened when I set it to 100% ? It works perfect even at 3.5.1.
I can barely imagine how did u manage to found this out. Thanks again!

Link to comment
Share on other sites

7 hours ago, Alexey Matlash said:

 I`m sorry, if you found it impolite 😅 I`m 100% sure you are doing your best! Thanks for your time, great lib, awesome plugin ;)

Oh no, I didn't take it in a negative way at all. No worries :) Sorry if my response came off as snarky or something. I didn't mean it that way. 

 

Cheers!

Link to comment
Share on other sites

  • 11 months later...

Hi Guys, I think this issue might still be persisting on Mobile/tablet. I'm looking at the codepen demo on an iPhone & iPad Pro  (iOS 15) and the snapping is jumping around, snapping back to start rather than the next slide... Please could you take a look at demo on these devices to verify?  

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

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