7samurai Posted May 20, 2021 Share Posted May 20, 2021 Sorry no codepen , but maybe some has stumble over the same Problem: On a page with a lot of ScrollTriggert Animations, it works great so far. If the user switch to an other page, and use the browser back button, some of the animations not working anymore. on the elements wit the problems, the starting values are set (opacity: 0.5; transform: translate(50%, 0%);), and when i switch "markers: true", the Markers not shown at the Element, its is deeper on the page, but why? Any ideas? it appears only, if you use the browser back buttons, if you switch back to the page using an link, it works all fine. Link to comment Share on other sites More sharing options...
Cassie Posted May 20, 2021 Share Posted May 20, 2021 I've never encountered this I'm afraid. Do you have a link you could share? Link to comment Share on other sites More sharing options...
Solution 7samurai Posted May 20, 2021 Author Solution Share Posted May 20, 2021 i am sorry, but its an private project. I figured out, that an scrolltrigger.refresh() with an delay of 500ms helps. Link to comment Share on other sites More sharing options...
Cassie Posted May 20, 2021 Share Posted May 20, 2021 You really shouldn't have to do this. Is the back button genuinely going back and reloading a page or are you simulating some sort of back button functionality within a single page app? Link to comment Share on other sites More sharing options...
7samurai Posted May 20, 2021 Author Share Posted May 20, 2021 No, the normal back button of the browser. Or, with the right mouse context menu, select back.. all kinds of history.back on the page are 18 scroll listener for different objects + 3 large horizontal scroller. When the page is going live, i post the link Link to comment Share on other sites More sharing options...
Cassie Posted May 20, 2021 Share Posted May 20, 2021 That would be wonderful, thanks. I'm very intrigued. Link to comment Share on other sites More sharing options...
OSUblake Posted May 20, 2021 Share Posted May 20, 2021 Something definitely sounds a little strange here. I don't see how that behavior would be possible unless you are using some framework/library to handle the routing for you. Are you using anything else besides gsap? And you are you using a dev server with hot reload like webpack, etc? 2 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