Skip to content

Commit

Permalink
[iOS] Resubmit facebook#24714 and fixes kvo crash
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwuzw committed May 16, 2019
1 parent de0d7cf commit e7d6441
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Libraries/Text/TextInput/Singleline/RCTUITextField.m
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ - (CGRect)editingRectForBounds:(CGRect)bounds

#pragma mark - Overrides

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
// Overrides selectedTextRange setter to get notify when selectedTextRange changed.
- (void)setSelectedTextRange:(UITextRange *)selectedTextRange
{
[_textInputDelegateAdapter selectedTextRangeWasSet];
[super setSelectedTextRange:selectedTextRange];
}
#pragma clang diagnostic pop

- (void)setSelectedTextRange:(UITextRange *)selectedTextRange notifyDelegate:(BOOL)notifyDelegate
{
if (!notifyDelegate) {
Expand Down

0 comments on commit e7d6441

Please sign in to comment.