From 3083200aefb534a27b982e06704d97df1f02de98 Mon Sep 17 00:00:00 2001 From: Rafael Lincoln Date: Tue, 30 May 2017 13:46:59 -0300 Subject: [PATCH] fix scroll to actual position --- animatedScrollTo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/animatedScrollTo.js b/animatedScrollTo.js index bc7d0cb..e93678b 100644 --- a/animatedScrollTo.js +++ b/animatedScrollTo.js @@ -33,7 +33,7 @@ lastpos = val; element.scrollTop = val; } - if (now > animationStart + duration) { + if (now > animationStart + duration || element.scrollTop == to) { element.scrollTop = to; animating = false; if (callback) { callback(); }