From c2c4f486a202c1364d60ed9552d51dd5264b3bd3 Mon Sep 17 00:00:00 2001 From: Mike Grabowski Date: Fri, 6 Apr 2018 18:10:34 +0200 Subject: [PATCH] Revert "Fix: Added scroll Bounds check in scrollToOffset method in RCTScrollView on iOS" This reverts commit 16c9e5b71500135a631480035af6cd2de3dafdc9. --- React/Views/ScrollView/RCTScrollView.m | 3 --- 1 file changed, 3 deletions(-) diff --git a/React/Views/ScrollView/RCTScrollView.m b/React/Views/ScrollView/RCTScrollView.m index 6a8f33539..f146ba0d2 100644 --- a/React/Views/ScrollView/RCTScrollView.m +++ b/React/Views/ScrollView/RCTScrollView.m @@ -575,9 +575,6 @@ static inline void RCTApplyTransformationAccordingLayoutDirection(UIView *view, - (void)scrollToOffset:(CGPoint)offset animated:(BOOL)animated { if (!CGPointEqualToPoint(_scrollView.contentOffset, offset)) { - CGFloat maxOffsetX = _scrollView.contentSize.width - _scrollView.bounds.size.width + _scrollView.contentInset.right; - CGFloat maxOffsetY = _scrollView.contentSize.height - _scrollView.bounds.size.height + _scrollView.contentInset.bottom; - offset = CGPointMake(MAX(0, MIN(maxOffsetX, offset.x)), MAX(0, MIN(maxOffsetY, offset.y))); // Ensure at least one scroll event will fire _allowNextScrollNoMatterWhat = YES; [_scrollView setContentOffset:offset animated:animated];