Revert #17927
Summary: This change is a revert of [#17927](https://github.com/facebook/react-native/pull/17927) pull-request. The pull-request caused an issue with the keyboard covering the text field at the bottom of the scroll view. Reviewed By: shergin Differential Revision: D7246609 fbshipit-source-id: 149f825274c4fa79ab593f1bae3602667d16ddee
This commit is contained in:
parent
db061ea8c7
commit
8466db0fd3
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue