File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ - (void)setSelection:(RCTTextSelection *)selection
235235- (void )setSelectionStart : (NSInteger )start
236236 selectionEnd : (NSInteger )end
237237{
238- #if !TARGET_OS_OSX // [ TODO(macOS v0.63 )
238+ #if !TARGET_OS_OSX // TODO(macOS ISS#2323203 )
239239 UITextPosition *startPosition = [self .backedTextInputView positionFromPosition: self .backedTextInputView.beginningOfDocument
240240 offset: start];
241241 UITextPosition *endPosition = [self .backedTextInputView positionFromPosition: self .backedTextInputView.beginningOfDocument
@@ -244,7 +244,11 @@ - (void)setSelectionStart:(NSInteger)start
244244 UITextRange *range = [self .backedTextInputView textRangeFromPosition: startPosition toPosition: endPosition];
245245 [self .backedTextInputView setSelectedTextRange: range notifyDelegate: NO ];
246246 }
247- #endif // ]TODO(macOS v0.63)
247+ #else // [TODO(macOS ISS#2323203)
248+ NSInteger startPosition = MIN (start, end);
249+ NSInteger endPosition = MAX (start, end);
250+ [self .backedTextInputView setSelectedTextRange: NSMakeRange (startPosition, endPosition - startPosition) notifyDelegate: NO ];
251+ #endif // ]TODO(macOS ISS#2323203)
248252}
249253
250254- (void )setTextContentType : (NSString *)type
You can’t perform that action at this time.
0 commit comments