diff --git a/cocos/ui/UIScrollView.cpp b/cocos/ui/UIScrollView.cpp index b9261f3..5660f7a 100644 --- a/cocos/ui/UIScrollView.cpp +++ b/cocos/ui/UIScrollView.cpp @@ -609,14 +609,13 @@ void ScrollView::processAutoScrolling(float deltaTime) } } + moveInnerContainer(newPosition - getInnerContainerPosition(), reachedEnd); // Finish auto scroll if it ended if(reachedEnd) { _autoScrolling = false; dispatchEvent(EventType::AUTOSCROLL_ENDED); } - - moveInnerContainer(newPosition - getInnerContainerPosition(), reachedEnd); } void ScrollView::jumpToDestination(const Vec2 &des)