diff --git a/src/skrollr.js b/src/skrollr.js index 2ff15f36..1bb4fd57 100644 --- a/src/skrollr.js +++ b/src/skrollr.js @@ -594,6 +594,10 @@ _scrollAnimation.done.call(_instance, true); } + if(_smoothScrolling) { + _smoothScrolling.targetTop = _instance.getScrollTop(); //Update smooth scroll data so we don't scroll in next _render loop + } + _scrollAnimation = undefined; }; @@ -1076,6 +1080,9 @@ //It's over if(now >= _scrollAnimation.endTime) { renderTop = _scrollAnimation.targetTop; + if(_smoothScrolling) { + _smoothScrolling.targetTop = renderTop; //Update smooth scroll data so we don't scroll in next _render loop + } afterAnimationCallback = _scrollAnimation.done; _scrollAnimation = undefined; } else {