mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix textAttributes not applied when typing text (#23585)
Summary: Currently, if we has `defaultValue`, textAttributes like `letterSpacing` can works, but if textinput has not default text, when we typing the text, some attributes not applied. [iOS] [Fixed] - Fix textAttributes not applied when typing text Pull Request resolved: https://github.com/facebook/react-native/pull/23585 Differential Revision: D14206568 Pulled By: cpojer fbshipit-source-id: 7db276d811684bf6e01f8d30287cca80095db87c
This commit is contained in:
committed by
Facebook Github Bot
parent
8d2e8fdca4
commit
7a7eb11965
@@ -68,13 +68,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
||||
- (void)enforceTextAttributesIfNeeded
|
||||
{
|
||||
id<RCTBackedTextInputViewProtocol> backedTextInputView = self.backedTextInputView;
|
||||
if (backedTextInputView.attributedText.string.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
backedTextInputView.font = _textAttributes.effectiveFont;
|
||||
backedTextInputView.textColor = _textAttributes.effectiveForegroundColor;
|
||||
backedTextInputView.textAlignment = _textAttributes.alignment;
|
||||
backedTextInputView.reactTextAttributes = _textAttributes;
|
||||
}
|
||||
|
||||
- (void)setReactPaddingInsets:(UIEdgeInsets)reactPaddingInsets
|
||||
|
||||
Reference in New Issue
Block a user