Commit 1ed06c87 authored by Stepan Khapugin's avatar Stepan Khapugin Committed by Commit Bot

[iOS] Fix first combined character input.

This is a fix for broken input of the first combined character in the
omnibox (for example in Korean).
This introduces a regression on older OS versions when using third party
keyboards; however this regression is *already* happening on the latest
iOS 13 builds.
This is a temporary fix; a proper fix is to change pre-edit behaviour
so that it wouldn't set text or change selection in the omnibox when it
exits pre-edit. Such a fix is a lot more fragile and will be rolled out
behind a flag, but we need to fix the common-case input of combined
character on latest OS now.

Bug: 1030476, 988431, 875918, 873544
Change-Id: I33248fdb17d75e215dedea11469de94dd7dc183c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1980746
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarRobbie Gibson <rkgibson@google.com>
Cr-Commit-Position: refs/heads/master@{#728505}
parent c72ebb94
...@@ -337,9 +337,7 @@ bool OmniboxViewIOS::OnWillChange(NSRange range, NSString* new_text) { ...@@ -337,9 +337,7 @@ bool OmniboxViewIOS::OnWillChange(NSRange range, NSString* new_text) {
// as if the pre-edit fake selection was real. // as if the pre-edit fake selection was real.
[field_ exitPreEditState]; [field_ exitPreEditState];
field_.selectedTextRange = field_.text = @"";
[field_ textRangeFromPosition:field_.beginningOfDocument
toPosition:field_.endOfDocument];
// Reset |range| to be of zero-length at location zero, as the field will be // Reset |range| to be of zero-length at location zero, as the field will be
// now cleared. // now cleared.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment