madebysource / animated-scrollto

Animated scrolling without any dependency on libraries
MIT License
319 stars 57 forks source link

Removes check for lastpos === element.scrolltop Fixes safari bug #7

Open MaxDavila opened 9 years ago

MaxDavila commented 9 years ago

animatedScrollTo is broken in Safari. Whenever lastpos !== element.scrolltop it kills the animation even before reaching the desired position to scroll to. We are already returning false and stopping the animation once already in now > animationStart + duration. screen shot 2014-10-29 at 10 58 28 pm screen shot 2014-10-29 at 10 59 49 pm

jaywcjlove commented 9 years ago

Very powerful!

MethodGrab commented 9 years ago

This does fix the problem for Safari 6 (Safari 8.0.2 works fine without this fix), but it removes the "If user scrolls while animation is running, scroll animation would be immediately canceled" feature.

gijsroge commented 9 years ago

I fixed this issue that doesn't break any features. PR: #9