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 5f3b03043eb0d6793db7fb47026ea428a26ab0ec..c3c9239bbacec1fc4ff78730f8453c33811ed659 100644 |
--- a/components/autofill/content/renderer/autofill_agent.cc |
+++ b/components/autofill/content/renderer/autofill_agent.cc |
@@ -601,6 +601,8 @@ 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()); |
} |
void AutofillAgent::HidePopup() { |