benrbnt Posted May 19, 2023 Share Posted May 19, 2023 Hello, I have an issue I can't manage trop reproduce in a simple codepen (available here: ) but as a demo, here is a video where the "bug" occurs. I don't have any specific ScrollTrigger configuration. My ScrollTrigger config in the video is the exact same one as the one in the codepen. I use Lenis, added it in the Codepen too, and it looks like it is not the issue here compress-Enregistrement de l’écran 2023-05-19 à 13.06.57.mp4 See the Pen QWZJEEQ?editors=1111 by benjaminrobinet (@benjaminrobinet) on CodePen Link to comment Share on other sites More sharing options...
Rodrigo Posted May 19, 2023 Share Posted May 19, 2023 Hi, What is exactly the issue we should be looking at? You didn't describe what's the problem in the video. Finally as you mention in Codepen everything works as expected. The demo is using the latest version of GSAP and ScrollTrigger. Be sure to use 3.11.5 in your development environment, for the GSAP Core and any Plugin you're using. Happy Tweening! Link to comment Share on other sites More sharing options...
benrbnt Posted June 1, 2023 Author Share Posted June 1, 2023 @Rodrigo Hello! Sorry for my late answer. In the video I console.log in different actions callbacks (enter, enter back, leave, leave back). As you can see when I "leave back" the trigger when resizing, the action is not called. Link to comment Share on other sites More sharing options...
Rodrigo Posted June 1, 2023 Share Posted June 1, 2023 Hi, I just checked your codepen and after a resize everything works as expected. I keep seeing all the callbacks there, maybe I'm missing something ?♂️ There could be something else in your setup that's causing this, unfortunately a video doesn't tell us the whole story and as stated before your codepen is working as expected. One alternative could be to test next release's beta files: https://assets.codepen.io/16327/gsap-latest-beta.min.js https://assets.codepen.io/16327/ScrollTrigger.min.js Give those a try and let us know. Hopefully this helps. Happy Tweening! Link to comment Share on other sites More sharing options...
benrbnt Posted June 2, 2023 Author Share Posted June 2, 2023 @Rodrigo I might have a guess for the issue: I use gsap matchMedia scope for my ScrollTriggers, so when I resize, sometimes the ScrollTrigger is re-created then the action of the previously created ScrollTrigger won't be called. As a fix, in my case I could just use the cleanup function of the scope. Sorry for not having been clear enough. Thanks for your help Link to comment Share on other sites More sharing options...
Rodrigo Posted June 2, 2023 Share Posted June 2, 2023 Hi, Have you checked this example? See the Pen KKoMpMv by GreenSock (@GreenSock) on CodePen I'm curious about what's not working for you. If possible, could you create a codepen example or update the one you already created with this issue you're seeing? Happy Tweening! 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