Skip to content
Permalink
Browse files
Fixes TextInput shaking when typing Chinese (#28805)
Summary:
Fixes #28488.

## Changelog

[iOS] [Fixed] - Fixes TextInput shaking when typing Chinese
Pull Request resolved: #28805

Test Plan: Demo see #28488.

Differential Revision: D21376803

Pulled By: shergin

fbshipit-source-id: b1fe6cc5f67d42ef98a6c12b8ab9990feac0e2a7
  • Loading branch information
zhongwuzw authored and facebook-github-bot committed May 4, 2020
1 parent 87d000f commit 9cdc19a93669b37c0518bd32263e156ffc9193c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
@@ -104,6 +104,10 @@ - (void)setPlaceholderColor:(UIColor *)placeholderColor

- (void)setDefaultTextAttributes:(NSDictionary<NSAttributedStringKey, id> *)defaultTextAttributes
{
if ([_defaultTextAttributes isEqualToDictionary:defaultTextAttributes]) {
return;
}

_defaultTextAttributes = defaultTextAttributes;
self.typingAttributes = defaultTextAttributes;
[self _updatePlaceholder];
@@ -68,6 +68,10 @@ - (void)setPlaceholderColor:(UIColor *)placeholderColor

- (void)setDefaultTextAttributes:(NSDictionary<NSAttributedStringKey, id> *)defaultTextAttributes
{
if ([_defaultTextAttributes isEqualToDictionary:defaultTextAttributes]) {
return;
}

_defaultTextAttributes = defaultTextAttributes;
[super setDefaultTextAttributes:defaultTextAttributes];
[self _updatePlaceholder];

0 comments on commit 9cdc19a

Please sign in to comment.