mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Revert "Fix: Added scroll Bounds check in scrollToOffset method in RCTScrollView on iOS"
This reverts commit 16c9e5b715.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user