Louis Pop Posted August 19, 2021 Share Posted August 19, 2021 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? Link to comment Share on other sites More sharing options...
Cassie Posted August 19, 2021 Share Posted August 19, 2021 Hi Louis - could you possibly put together a minimal demo showing this issue? Link to comment Share on other sites More sharing options...
Louis Pop Posted August 20, 2021 Author Share Posted August 20, 2021 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 More sharing options...
GreenSock Posted August 20, 2021 Share Posted August 20, 2021 @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 More sharing options...
Louis Pop Posted August 20, 2021 Author Share Posted August 20, 2021 https://giphy.com/gifs/scroltrigger-Br8jmkNReaKrWC5KfG/fullscreen Link to comment Share on other sites More sharing options...
Louis Pop Posted August 20, 2021 Author Share Posted August 20, 2021 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 More sharing options...
Solution GreenSock Posted August 20, 2021 Solution Share Posted August 20, 2021 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? 2 Link to comment Share on other sites More sharing options...
Louis Pop Posted August 20, 2021 Author Share Posted August 20, 2021 Yes yes! That solves the problem! Thank you very much GrennSock and Cassie! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now