Skip to content

Commit 46fd864

Browse files
sherginfacebook-github-bot
authored andcommitted
Proper attributed strings comparsion in RCTBaseTextInputView
Summary: Now, in the new model, we transfer text attributes with actual text via attributed text to a native text component, so previous text-only comparsion is not sufficient anymore. Depends on D6600685. Differential Revision: D6809833 fbshipit-source-id: 475b7426cf3c6694781790d99ef32466606da2f2
1 parent e9b83e6 commit 46fd864

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/Text/TextInput/RCTBaseTextInputView.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ - (void)setAttributedText:(NSAttributedString *)attributedText
102102
{
103103
NSInteger eventLag = _nativeEventCount - _mostRecentEventCount;
104104

105-
if (eventLag == 0 && ![attributedText.string isEqualToString:self.backedTextInputView.attributedText.string]) {
105+
if (eventLag == 0 && ![attributedText isEqualToAttributedString:self.backedTextInputView.attributedText]) {
106106
UITextRange *selection = self.backedTextInputView.selectedTextRange;
107107
NSInteger oldTextLength = self.backedTextInputView.attributedText.string.length;
108108

0 commit comments

Comments
 (0)