Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/react-native/Libraries/Text/React-RCTText.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Pod::Spec.new do |s|

s.dependency "Yoga"
s.dependency "React-Core/RCTTextHeaders", version
add_dependency(s, "React-featureflags")

mark_as_react_native_build(s)
end
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@

#import <React/RCTBackedTextInputDelegateAdapter.h>

@interface RCTBackedTextViewDelegateAdapter (PendingTextInputEdit)
- (void)invalidatePendingTextInputEdit;
- (void)schedulePendingTextInputEditWithRange:(NSRange)range replacementText:(NSString *)replacementText;
@end

@implementation RCTUITextView {
UILabel *_placeholderView;
UITextView *_detachedTextView;
Expand Down Expand Up @@ -207,6 +212,16 @@ - (void)setSelectedTextRange:(UITextRange *)selectedTextRange notifyDelegate:(BO
[super setSelectedTextRange:selectedTextRange];
}

- (void)rct_invalidatePendingTextInputEdit
{
[_textInputDelegateAdapter invalidatePendingTextInputEdit];
}

- (void)rct_enqueueTextInputEditWithRange:(NSRange)range replacementText:(NSString *)replacementText
{
[_textInputDelegateAdapter schedulePendingTextInputEditWithRange:range replacementText:replacementText];
}

// After restoring the previous cursor position, we manually trigger the scroll to the new cursor position (PR 38679).
- (void)scrollRangeToVisible:(NSRange)range
{
Expand Down
Loading
Loading