mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fixes TextInput shaking when typing Chinese (#28805)
Summary: Fixes https://github.com/facebook/react-native/issues/28488. ## Changelog [iOS] [Fixed] - Fixes TextInput shaking when typing Chinese Pull Request resolved: https://github.com/facebook/react-native/pull/28805 Test Plan: Demo see https://github.com/facebook/react-native/issues/28488. Differential Revision: D21376803 Pulled By: shergin fbshipit-source-id: b1fe6cc5f67d42ef98a6c12b8ab9990feac0e2a7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
87d000f890
commit
9cdc19a936
@@ -104,6 +104,10 @@ static UIColor *defaultPlaceholderColor()
|
||||
|
||||
- (void)setDefaultTextAttributes:(NSDictionary<NSAttributedStringKey, id> *)defaultTextAttributes
|
||||
{
|
||||
if ([_defaultTextAttributes isEqualToDictionary:defaultTextAttributes]) {
|
||||
return;
|
||||
}
|
||||
|
||||
_defaultTextAttributes = defaultTextAttributes;
|
||||
self.typingAttributes = defaultTextAttributes;
|
||||
[self _updatePlaceholder];
|
||||
|
||||
@@ -68,6 +68,10 @@
|
||||
|
||||
- (void)setDefaultTextAttributes:(NSDictionary<NSAttributedStringKey, id> *)defaultTextAttributes
|
||||
{
|
||||
if ([_defaultTextAttributes isEqualToDictionary:defaultTextAttributes]) {
|
||||
return;
|
||||
}
|
||||
|
||||
_defaultTextAttributes = defaultTextAttributes;
|
||||
[super setDefaultTextAttributes:defaultTextAttributes];
|
||||
[self _updatePlaceholder];
|
||||
|
||||
Reference in New Issue
Block a user