简体   繁体   中英

ScrollTo stops when website navigation is clicked (OSX 10.8.4 with Safari 6.0.5)

I'm developing a website with superscrollorama pinned animations and have some issues on OSX 10.8.4 devices. Issues are with Safari 6 browser.

There is a site navigation where window is scrolling to Y position using Greensock's ScrollToPlugin.

Everything is fine on Windows and Linux machines with all major browsers (Safari too), but in Safari 6.0.5 on Macbook Pro with OSX 10.8.4 operating system scroll stops after random amount of pixels (It works in other browsers on OSX machine).

When navigation link is clicked again - page scrolls some more but stops again and so on, while it gets to the right Y position.

I'm wondering, maybe somebody experienced similar issue and can share the solution?

So there is an option with superscrollorama that you need to use if you are going to use navigation links and pins.

pushFollowers: Decide if following elements should be pushed down (true) or scrolled past (false), default: true

The basic idea of this is that if set to true the spacing elements that are automatically added after the DOM is done loading will space out the elements. The problem is then none of the DOM level elements are correctly positioned and are offset via the pins. The best way around this is to set the option to false and add a manual spacer with a height or padding of the size of the pin to take the space of it in the DOM. That way when using links you get to the right part of the page. I still have issues with the state of the animation when using links, some times the animation is completed sometimes it is not depending on some factors. I have no known solution to that at this point.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM