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 79542aff2520a500debcf60c29699d73e28d5524..d3db7520559ac09d63c8099e74a1c88552598030 100644 |
--- a/components/autofill/content/renderer/autofill_agent.cc |
+++ b/components/autofill/content/renderer/autofill_agent.cc |
@@ -740,8 +740,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(value, node); |
} |
void AutofillAgent::ProcessForms() { |