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

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

Issue 2534313007: Prevent default on tap when showing the credit card or address dialog. (Closed)
Patch Set: Address Nit Created 4 years 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 | 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/autofill_section.js
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js b/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js
index 8e243d3a257b7f3900cee0967ce80cd4fe0f6bfb..5d3a8651380cb4145a384ce3055aa8c2dcb97ed0 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js
@@ -81,9 +81,11 @@
/**
* Handles tapping on the "Add address" button.
+ * @param {!Event} e The polymer event.
* @private
*/
- onAddAddressTap_: function() {
+ onAddAddressTap_: function(e) {
+ e.preventDefault();
this.activeAddress = {};
this.showAddressDialog_ = true;
},
@@ -95,9 +97,11 @@
/**
* Handles tapping on the "Edit" address button.
+ * @param {!Event} e The polymer event.
* @private
*/
- onMenuEditAddressTap_: function() {
+ onMenuEditAddressTap_: function(e) {
+ e.preventDefault();
if (this.activeAddress.metadata.isLocal)
this.showAddressDialog_ = true;
else
@@ -137,6 +141,7 @@
* @private
*/
onAddCreditCardTap_: function(e) {
+ e.preventDefault();
var date = new Date(); // Default to current month/year.
var expirationMonth = date.getMonth() + 1; // Months are 0 based.
this.activeCreditCard = {
@@ -153,9 +158,11 @@
/**
* Handles tapping on the "Edit" credit card button.
+ * @param {!Event} e The polymer event.
* @private
*/
- onMenuEditCreditCardTap_: function() {
+ onMenuEditCreditCardTap_: function(e) {
+ e.preventDefault();
if (this.activeCreditCard.metadata.isLocal)
this.showCreditCardDialog_ = true;
else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698