mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-04 22:56:32 +08:00
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
This commit is contained in:
committed by
Facebook Github Bot
parent
e9b83e608e
commit
46fd864348
@@ -102,7 +102,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
||||
{
|
||||
NSInteger eventLag = _nativeEventCount - _mostRecentEventCount;
|
||||
|
||||
if (eventLag == 0 && ![attributedText.string isEqualToString:self.backedTextInputView.attributedText.string]) {
|
||||
if (eventLag == 0 && ![attributedText isEqualToAttributedString:self.backedTextInputView.attributedText]) {
|
||||
UITextRange *selection = self.backedTextInputView.selectedTextRange;
|
||||
NSInteger oldTextLength = self.backedTextInputView.attributedText.string.length;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user