Skip to content

Commit

Permalink
Update patch
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki committed Dec 10, 2024
1 parent df2e3c5 commit 0d0bcf5
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
diff --git a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
index db7cba4..6937720 100644
index 4827219..2e7b1a1 100644
--- a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
+++ b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
@@ -88,6 +88,7 @@ - (void)didMoveToWindow
@@ -114,6 +114,7 @@ - (void)didMoveToWindow
const auto &props = static_cast<const TextInputProps &>(*_props);
if (props.autoFocus) {
[_backedTextInputView becomeFirstResponder];
+ [self scrollCursorIntoView];
}
_didMoveToWindow = YES;
[self initializeReturnKeyType];
@@ -301,6 +302,7 @@ - (void)textInputDidBeginEditing
[self textInputDidChangeSelection];
}
@@ -342,6 +343,7 @@ - (BOOL)textInputShouldBeginEditing

- (void)textInputDidBeginEditing
{
+ [self scrollCursorIntoView];
if (_eventEmitter) {
static_cast<const TextInputEventEmitter &>(*_eventEmitter).onFocus([self _textInputMetrics]);
}
@@ -674,6 +676,15 @@ - (void)_setAttributedString:(NSAttributedString *)attributedString
@@ -729,6 +731,15 @@ - (void)_setAttributedString:(NSAttributedString *)attributedString
_lastStringStateWasUpdatedWith = attributedString;
}

Expand All @@ -31,6 +31,6 @@ index db7cba4..6937720 100644
+ }
+}
+
- (void)_setMultiline:(BOOL)multiline
{
[_backedTextInputView removeFromSuperview];
// Ensure that newly typed text will inherit any custom attributes. We follow the logic of RN Android, where attributes
// to the left of the cursor are copied into new text, unless we are at the start of the field, in which case we will
// copy the attributes from text to the right. This allows consistency between backed input and new AttributedText

0 comments on commit 0d0bcf5

Please sign in to comment.