Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(937)

Unified Diff: chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc

Issue 2888203004: Properly update the payment request credit card billing combob box when a new address is added. (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
index 4562c3355bb6b68a5de560009b3982c2e1ddb481..09fa367985cc440e241a150383822593e2496e2b 100644
--- a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
+++ b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
@@ -372,9 +372,9 @@ void CreditCardEditorViewController::AddAndSelectNewBillingAddress(
autofill::AddressComboboxModel* model =
static_cast<autofill::AddressComboboxModel*>(address_combobox->model());
int index = model->AddNewProfile(profile);
- address_combobox->SetSelectedIndex(index);
- // Force revalidation.
- address_combobox->OnBlur();
+ // SetSelectedIndex doesn't trigger a perform action notification, which is
+ // needed to update the valid state.
+ address_combobox->SetSelectedRow(index);
}
CreditCardEditorViewController::CreditCardValidationDelegate::
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698