diff --git a/React/Views/ScrollView/RCTScrollView.m b/React/Views/ScrollView/RCTScrollView.m index f0f64021aca6..b73719752629 100644 --- a/React/Views/ScrollView/RCTScrollView.m +++ b/React/Views/ScrollView/RCTScrollView.m @@ -944,7 +944,7 @@ - (void)uiManagerWillPerformMounting:(RCTUIManager *)manager CGPointMake(self->_scrollView.contentOffset.x + deltaX, self->_scrollView.contentOffset.y); if (autoscrollThreshold != nil) { // If the offset WAS within the threshold of the start, animate to the start. - if (x - deltaX <= [autoscrollThreshold integerValue]) { + if (x <= [autoscrollThreshold integerValue]) { [self scrollToOffset:CGPointMake(-leftInset, self->_scrollView.contentOffset.y) animated:YES]; } } @@ -960,7 +960,7 @@ - (void)uiManagerWillPerformMounting:(RCTUIManager *)manager CGPointMake(self->_scrollView.contentOffset.x, self->_scrollView.contentOffset.y + deltaY); if (autoscrollThreshold != nil) { // If the offset WAS within the threshold of the start, animate to the start. - if (y - deltaY <= [autoscrollThreshold integerValue]) { + if (y <= [autoscrollThreshold integerValue]) { [self scrollToOffset:CGPointMake(self->_scrollView.contentOffset.x, -bottomInset) animated:YES]; } }