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

Unified Diff: chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.js

Issue 2382943002: MD Settings: Migrating add/edit address dropdowns to native select. (Closed)
Patch Set: Addressing comment. Created 4 years, 2 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
Index: chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.js
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.js b/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.js
index 7f790c0284b35ed4a8f82ff7b09955ac726cda82..fa8a4181c642b69d16a814735227be2b4f91c09a 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.js
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.js
@@ -65,10 +65,12 @@ Polymer({
this.email_ =
this.address.emailAddresses ? this.address.emailAddresses[0] : '';
- if (this.countryCode_ == this.address.countryCode)
- this.updateAddressWrapper_();
- else
- this.countryCode_ = this.address.countryCode;
+ this.async(function() {
+ if (this.countryCode_ == this.address.countryCode)
+ this.updateAddressWrapper_();
+ else
+ this.countryCode_ = this.address.countryCode;
+ }.bind(this));
}.bind(this));
// Open is called on the dialog after the address wrapper has been updated.
@@ -183,6 +185,12 @@ Polymer({
this.address.countryCode = countryCode;
this.updateAddressWrapper_();
},
+
+ /** @private */
+ onCountryChange_: function() {
+ var countrySelect = /** @type {!HTMLSelectElement} */ (this.$$('select'));
+ this.countryCode_ = countrySelect.value;
+ },
});
})();

Powered by Google App Engine
This is Rietveld 408576698