diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java index 86d9dafffe2d67..5ed6093fa0c99f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java @@ -218,6 +218,12 @@ public void setDecelerationRate(float decelerationRate) { } } + public void abortAnimation() { + if (mScroller != null && !mScroller.isFinished()) { + mScroller.abortAnimation(); + } + } + public void setSnapInterval(int snapInterval) { mSnapInterval = snapInterval; } @@ -1070,7 +1076,6 @@ public void reactSmoothScrollTo(int x, int y) { */ @Override public void scrollTo(int x, int y) { - mScroller.abortAnimation(); super.scrollTo(x, y); ReactScrollViewHelper.updateFabricScrollState(this); setPendingContentOffsets(x, y); diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java index b41b0858f6f83b..33658e78788eeb 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java @@ -213,6 +213,7 @@ public void flashScrollIndicators(ReactScrollView scrollView) { @Override public void scrollTo( ReactScrollView scrollView, ReactScrollViewCommandHelper.ScrollToCommandData data) { + scrollView.abortAnimation(); if (data.mAnimated) { scrollView.reactSmoothScrollTo(data.mDestX, data.mDestY); } else {