@@ -579,8 +579,9 @@ - (BOOL)_textOf:(NSAttributedString *)newText equals:(NSAttributedString *)oldTe
579
579
// the settings on a dictation.
580
580
// Similarly, when the user is in the middle of inputting some text in Japanese/Chinese, there will be styling on the
581
581
// 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
584
585
// NSOriginalFont. Lastly, when entering a password, etc., there will be additional styling on the field as the native
585
586
// text view handles showing the last character for a split second.
586
587
__block BOOL fontHasBeenUpdatedBySystem = false ;
@@ -595,6 +596,7 @@ - (BOOL)_textOf:(NSAttributedString *)newText equals:(NSAttributedString *)oldTe
595
596
596
597
BOOL shouldFallbackToBareTextComparison =
597
598
[_backedTextInputView.textInputMode.primaryLanguage isEqualToString: @" dictation" ] ||
599
+ [_backedTextInputView.textInputMode.primaryLanguage isEqualToString: @" ko-KR" ] ||
598
600
_backedTextInputView.markedTextRange || _backedTextInputView.isSecureTextEntry || fontHasBeenUpdatedBySystem;
599
601
600
602
if (shouldFallbackToBareTextComparison) {
0 commit comments