Commit 20d67f5e authored by Friedrich Horschig's avatar Friedrich Horschig Committed by Commit Bot

[Mfill Android] Allow autofill suggestions for empty fields

Currently, we hide the autofill UI when the focused field was cleared.
For the Autofill popup, hiding is correct. For the keyboard accessory,
there is no additional UI that would pop up so we want to show all
suggestions again.

Bug: 942492
Change-Id: Ia8507e8e6cfb4e93dff69e9c967a74218e691184
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713517Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Friedrich [CET] <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679998}
parent 23737f6e
...@@ -639,7 +639,8 @@ void AutofillAgent::ShowSuggestions(const WebFormControlElement& element, ...@@ -639,7 +639,8 @@ void AutofillAgent::ShowSuggestions(const WebFormControlElement& element,
// criteria are not met. // criteria are not met.
WebString value = element.EditingValue(); WebString value = element.EditingValue();
if (value.length() > kMaxDataLength || if (value.length() > kMaxDataLength ||
(!options.autofill_on_empty_values && value.IsEmpty()) || (!IsKeyboardAccessoryEnabled() && !options.autofill_on_empty_values &&
value.IsEmpty()) ||
(options.requires_caret_at_end && (options.requires_caret_at_end &&
(element.SelectionStart() != element.SelectionEnd() || (element.SelectionStart() != element.SelectionEnd() ||
element.SelectionEnd() != static_cast<int>(value.length())))) { element.SelectionEnd() != static_cast<int>(value.length())))) {
......
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