summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/autofill_external_delegate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autofill/autofill_external_delegate.cc')
-rw-r--r--chrome/browser/autofill/autofill_external_delegate.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/autofill/autofill_external_delegate.cc b/chrome/browser/autofill/autofill_external_delegate.cc
index 98ec1b4..6f1f713 100644
--- a/chrome/browser/autofill/autofill_external_delegate.cc
+++ b/chrome/browser/autofill/autofill_external_delegate.cc
@@ -37,14 +37,16 @@ AutofillExternalDelegate::AutofillExternalDelegate(
void AutofillExternalDelegate::SelectAutofillSuggestionAtIndex(int unique_id,
int list_index) {
- if (unique_id == WebAutofillClient::MenuItemIDPasswordEntry)
- return;
-
if (list_index == suggestions_options_index_ ||
list_index == suggestions_clear_index_ ||
unique_id == WebAutofillClient::MenuItemIDWarningMessage)
return;
+ ClearPreviewedForm();
+
+ if (unique_id == WebAutofillClient::MenuItemIDPasswordEntry)
+ return;
+
FillAutofillFormData(unique_id, true);
}