Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c679dab

Browse files
committedNov 3, 2021
add fabric version
1 parent ea6b9d8 commit c679dab

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,9 @@ - (BOOL)_textOf:(NSAttributedString *)newText equals:(NSAttributedString *)oldTe
579579
// the settings on a dictation.
580580
// Similarly, when the user is in the middle of inputting some text in Japanese/Chinese, there will be styling on the
581581
// text that we should disregard. See
582-
// https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc for more info. If
583-
// the user added an emoji, the system adds a font attribute for the emoji and stores the original font in
582+
// https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc for more info.
583+
// Also, updating the attributed text while inputting Korean language will break input mechanism.
584+
// If the user added an emoji, the system adds a font attribute for the emoji and stores the original font in
584585
// NSOriginalFont. Lastly, when entering a password, etc., there will be additional styling on the field as the native
585586
// text view handles showing the last character for a split second.
586587
__block BOOL fontHasBeenUpdatedBySystem = false;
@@ -595,6 +596,7 @@ - (BOOL)_textOf:(NSAttributedString *)newText equals:(NSAttributedString *)oldTe
595596

596597
BOOL shouldFallbackToBareTextComparison =
597598
[_backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"dictation"] ||
599+
[_backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"ko-KR"] ||
598600
_backedTextInputView.markedTextRange || _backedTextInputView.isSecureTextEntry || fontHasBeenUpdatedBySystem;
599601

600602
if (shouldFallbackToBareTextComparison) {

0 commit comments

Comments
 (0)
Please sign in to comment.