sammekekko Posted January 23 Share Posted January 23 Hello, I have encountered a frustrating problem where my navigation page opened by the menu button, is not smoothly animated on safari. I added a will-change: transform for the divs that were animated with transform. This did not help my issue. Example of this can be seen live on the website on mobile sizes: press on the menu text in the navbar (I am far from done with the website overall). .navigation-page-navbar, .bottom-container and .navigation-page all have will-change: transform; Here is the animation in JS: let menuTimeline = $gsap.timeline({ paused: true }); menuTimeline .set("html, body", { overflowY: "hidden", }) .set(".navigation-page-navbar", { xPercent: 50, }) .set(".bottom-container", { xPercent: 50, }) .to(".navigation-page", { xPercent: -100, duration: 0.8, ease: "power4.inOut", }) .to(".navigation-page-navbar", { xPercent: 0, duration: 0.5, delay: -0.55, ease: "power4.inOut", }) .to(".bottom-container", { xPercent: 0, duration: 0.65, delay: -0.6, ease: "power4.inOut", }) .to("html", 0.4, { "--nav-hamburger-width": "100%", ease: "Power2.easeInOut", delay: -0.7, }); stackblitz demo: https://stackblitz.com/edit/nuxt-starter-dyou9c?file=components%2FHeader.vue Thanks ahead for trying to help me! Link to comment Share on other sites More sharing options...
GSAP Helper Posted January 24 Share Posted January 24 Without a minimal demo, it's very difficult to troubleshoot; the issue could be caused by CSS, markup, a third party library, a 3rd party script, etc. Would you please provide a very simple CodePen or Stackblitz that illustrates the issue? Please don't include your whole project. Just some colored <div> elements and the GSAP code is best. See if you can recreate the issue with as few dependancies as possible. Start minimal and then incrementally add code bit by bit until it breaks. Usually people solve their own issues during this process! If not, at least we have a reduced test case which greatly increases your chances of getting a relevant answer. See the Pen aYYOdN by GreenSock (@GreenSock) on CodePen that loads all the plugins. Just click "fork" at the bottom right and make your minimal demo: Using a framework/library like React, Vue, Next, etc.? CodePen isn't always ideal for these tools, so here are some Stackblitz starter templates that you can fork and import the gsap-trial NPM package for using any of the bonus plugins: React (please read this article!) Next Svelte Sveltekit Vue Nuxt Please share the StackBlitz link directly to the file in question (where you've put the GSAP code) so we don't need to hunt through all the files. Once we see an isolated demo, we'll do our best to jump in and help with your GSAP-specific questions. ✅ Link to comment Share on other sites More sharing options...
sammekekko Posted January 24 Author Share Posted January 24 I added a minimal demo, but stackblitz fails to install the dependencies on safari unfortunately.. It works fine on firefox for me. Link to comment Share on other sites More sharing options...
Rodrigo Posted January 24 Share Posted January 24 That seems to be a real old version, maybe try creating a new one on Stackblitz dashboard: Just go to the fullstack tab and click on Nuxt3, then open a new terminal and install GSAP. If you keep having issues perhaps try Codesandbox. We prefer Stackblitz because it's simpler: https://codesandbox.io/ Happy Tweening! Link to comment Share on other sites More sharing options...
sammekekko Posted January 25 Author Share Posted January 25 Hello! Thanks for giving me some options to try! I forked the latest version of Nuxt 3 as you said, but got the same error as before (only in safari). I also tried codesandbox, but it wont even start out of the box, there seems to be an issue on their side. Link to comment Share on other sites More sharing options...
Rodrigo Posted January 25 Share Posted January 25 Hi, That's really odd... I mean Safari has been slowly becoming the new Internet Explorer but the fact that neither Stackblitz and Codesandbox can't run in it it's really something. Can you create a codepen demo that shows the issue? I know it doesn't include Nuxt or any of the other packages/libraries you're using but that could takes us a step closer to find what the problem could be. You can fork this starter codepen: See the Pen aYYOdN by GreenSock (@GreenSock) on CodePen 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