Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Louis Pop

Every time I leave the page the position of the "Start and End trigger" refresh and change position

Go to solution Solved by GreenSock,

Recommended Posts

Every time I leave the page the position of the "Start and End trigger" refresh and change position according to Viewport I guess... Can this be changed so that it stays in the same position?

 

giphy.gif?cid=790b76116fe8eb41075b6992e9

Link to comment
Share on other sites

Hi Louis - could you possibly put together a minimal demo showing this issue?

Link to comment
Share on other sites

This the test page I made, Look at the scroll trigger markers and how they  refresh their positions when you click on another Tab and then back to page https://ado.agency/testphonepage2/. I also tried to show this in the GIF above.

Link to comment
Share on other sites

@Louis Pop it's very difficult to troubleshoot a live page - can you please provide a minimal demo as a CodePen or something like that? The URL you provided has a LOT going on in there, including 3rd party libraries. Thousands of lines of code/markup. Just isolate the one issue as much as possible and strip out any 3rd party libraries - you don't even need to use the "real" artwork. Simple <div> elements are fine. 

 

Or if you'd like to explore paid consulting options that'd allow us to spend the necessary time digging into that URL, let us know. I think you'll find that it's much more efficient, though, to have you just isolate the issue in a CodePen that you post back here. 

 

For the record, ScrollTrigger listens for when a tab goes from hidden to active and it fires a ScrollTrigger.refresh() call which recalculates the start/end positions for all ScrollTriggers. It reverts the page (including any pinning) and checks the locations of things during that process, but I suspect that maybe you've got a 3rd party plugin that's interfering with that. Just a guess. That's part of the value of isolating things - if you strip it down to the basics with no 3rd party libraries and you can reproduce the problem in a CodePen that means it's likely something in ScrollTrigger. But if it works fine but then it breaks when you add in a 3rd party tool, you know that's the issue. 

Link to comment
Share on other sites

this the code

See the Pen JjNgMyG by Louispop (@Louispop) on CodePen

 

Look at Markers. Change tab and come back to see that the markers change position.

Link to comment
Share on other sites

  • Solution

Oh, it looks like you just have a very outdated version of ScrollTrigger loaded. I'd strongly recommend updating to 3.7.1. That resolves your issue, right? 

  • Like 2
Link to comment
Share on other sites

Yes yes! That solves the problem! Thank you very much GrennSock and Cassie! 

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