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

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

Issue 2654663006: MD Settings: Update Autofill Address Dialog to accept Enter Key (Closed)
Patch Set: Created 3 years, 11 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 | « chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fa8a4181c642b69d16a814735227be2b4f91c09a..502d07a6a1911e58ef73c8c3c6b34b573e876101 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
@@ -164,6 +164,10 @@ Polymer({
* @private
*/
onSaveButtonTap_: function() {
+ // The Enter key can call this function even if the button is disabled.
+ if (!this.canSave_)
+ return;
+
// Set a default country if none is set.
if (!this.address.countryCode)
this.address.countryCode = this.countries_[0].countryCode;
« no previous file with comments | « chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698