Index: components/autofill/content/renderer/autofill_agent.cc |
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc |
index 3c81afec325e9af1c079f137542326e7520d0919..34122813118ad05d0e9f801de8a8227fdeae7386 100644 |
--- a/components/autofill/content/renderer/autofill_agent.cc |
+++ b/components/autofill/content/renderer/autofill_agent.cc |
@@ -739,8 +739,7 @@ void AutofillAgent::PreviewFieldWithValue(const base::string16& value, |
was_query_node_autofilled_ = element_.isAutofilled(); |
node->setSuggestedValue(value.substr(0, node->maxLength())); |
node->setAutofilled(true); |
- node->setSelectionRange(node->value().length(), |
- node->suggestedValue().length()); |
+ PreviewSuggestion(node->suggestedValue(), node->value(), node); |
} |
void AutofillAgent::ProcessForms() { |