| Index: chrome/browser/resources/settings/people_page/sync_page.js
|
| diff --git a/chrome/browser/resources/settings/people_page/sync_page.js b/chrome/browser/resources/settings/people_page/sync_page.js
|
| index 3c99f727e1b1a77128cf79da716a5f2a07918082..8078686bd65191aa99cdd123b62bb0a8c771bf77 100644
|
| --- a/chrome/browser/resources/settings/people_page/sync_page.js
|
| +++ b/chrome/browser/resources/settings/people_page/sync_page.js
|
| @@ -293,10 +293,17 @@ Polymer({
|
| /**
|
| * Sends the newly created custom sync passphrase to the browser.
|
| * @private
|
| + * @param {Event} e
|
| */
|
| - onSaveNewPassphraseTap_: function() {
|
| + onSaveNewPassphraseTap_: function(e) {
|
| assert(this.creatingNewPassphrase_);
|
|
|
| + // Ignore events on irrevelant elements or with irrelevant keys.
|
| + if (e.target.tagName != 'PAPER-BUTTON' && e.target.tagName != 'PAPER-INPUT')
|
| + return;
|
| + if (e.type == 'keypress' && e.key != 'Enter')
|
| + return;
|
| +
|
| // If a new password has been entered but it is invalid, do not send the
|
| // sync state to the API.
|
| if (!this.validateCreatedPassphrases_())
|
| @@ -313,8 +320,12 @@ Polymer({
|
| /**
|
| * Sends the user-entered existing password to re-enable sync.
|
| * @private
|
| + * @param {Event} e
|
| */
|
| - onSubmitExistingPassphraseTap_: function() {
|
| + onSubmitExistingPassphraseTap_: function(e) {
|
| + if (e.type == 'keypress' && e.key != 'Enter')
|
| + return;
|
| +
|
| assert(!this.creatingNewPassphrase_);
|
|
|
| this.syncPrefs.setNewPassphrase = false;
|
|
|