Commit 13b15a8d authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Less restrictive Omnibox attributedText block.

Bug: 740075
Change-Id: I12f04bd64aa3d29bd72b75a54e7745741b284ce0
Reviewed-on: https://chromium-review.googlesource.com/568718
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486640}
parent f14b649d
......@@ -472,14 +472,16 @@ NSString* const kOmniboxFadeAnimationKey = @"OmniboxFadeAnimation";
// than |fieldText|, it seems it's OK to skip calling self.attributedText
// during the condition added below. If we change mobile omnibox to match
// desktop and also color the omnibox while self.editing, this workaround will
// no longer work.
// no longer work. The check for |autocompleteLength| reduces the scope of
// this workaround, without it having introduced crbug.com/740075.
BOOL updateText = YES;
// Before M61 branch point this should also go behind a Japanese flag, e.g.
// [self.textInputMode.primaryLanguage isEqualToString:@"ja-JP"] to be as
// restrictive as possible.
if (experimental_flags::IsThirdPartyKeyboardWorkaroundEnabled()) {
updateText =
(!self.editing || ![self.text isEqualToString:fieldText.string]);
(!self.editing || ![self.text isEqualToString:fieldText.string] ||
autocompleteLength == 0);
}
if (updateText) {
self.attributedText = fieldText;
......
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