Jump to content
Search Community

Problem with ScrollTo and autokill on Apple devices

Webman Webdesign test
Moderator Tag

Recommended Posts

Hi guys,

we have been using the ScrolltoPlugin for a while and until now everything worked fine. We use it mainly for scrolling to IDs on the same page (as well in the menu as in button links).

But today we testet a website we created on different devices and the scrolling on Apple devices was weird. It only scrolled a bit and stopped then. If you pressed the button again it scrolled a bit and stopped again.

 

The devices we tested on: iPad Air with iOS 12.5.5 and iPhone 13Pro with iOS 15.4.1. Both the same behavior. As well in Safari as in Chrome.

 

Here is our code for the Scrolling:

function scrollToHash(hash, e) {  
  const elem = hash ? document.querySelector(hash) : false;
  if(elem) {
    if(e) e.preventDefault();
    menu_scroller = gsap.to(window, {
     scrollTo: {
      y: elem, 
      autoKill: true,
      onAutoKill: null,
      duration: 2
    },               
    ease: Power2.easeInOut});
  }
}

If we remove the autokill from the code, everythings works as before. Has someone an idea on what might be the problem?

The same code worked fine before (we use GSAP and ScrollTo Version 3.7.0).

 

Thank you in advance.

 

Tanja Vogt

Webman Webdesign

Link to comment
Share on other sites

Hey there, have you updated your version of GSAP?

Just trying to work out what's changed

 

Do you possibly have a minimal demo recreating the issue? It's always helpful for us to see a codepen so we can narrow down the issue to GSAP and not something else (like a third party library) in your setup.

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