Skip to content

Commit 08078a4

Browse files
committed
Prevent scrolling when focusing external textfield
1 parent 9d7205f commit 08078a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-native/React/Views/ScrollView/RCTScrollView.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ - (void)_keyboardWillChangeFrame:(NSNotification *)notification
330330
if ([[UIApplication sharedApplication] sendAction:@selector(reactUpdateResponderOffsetForScrollView:) to:nil from:self forEvent:nil]) {
331331
// Inner text field focused
332332
CGFloat focusEnd = self.firstResponderFocus.origin.y + self.firstResponderFocus.size.height;
333-
if (focusEnd > endFrame.origin.y) {
333+
if (focusEnd > endFrame.origin.y && focusEnd != INFINITY) {
334334
// Text field active region is below visible area with keyboard - update offset to bring into view
335335
newContentOffset.y += focusEnd - endFrame.origin.y;
336336
}

0 commit comments

Comments
 (0)