Index: chrome/browser/resources/settings/people_page/password_prompt_dialog.js |
diff --git a/chrome/browser/resources/settings/people_page/password_prompt_dialog.js b/chrome/browser/resources/settings/people_page/password_prompt_dialog.js |
index 944be300729a55d39fbc942c1d744a90b2e80790..ed4cfa3147eea3926108806a8438b2ff5d38c92c 100644 |
--- a/chrome/browser/resources/settings/people_page/password_prompt_dialog.js |
+++ b/chrome/browser/resources/settings/people_page/password_prompt_dialog.js |
@@ -90,6 +90,9 @@ Polymer({ |
return; |
} |
+ if (this.$.dialog.open) |
+ return; |
+ |
this.$.dialog.showModal(); |
}, |
@@ -101,14 +104,10 @@ Polymer({ |
this.password_ = ''; |
}, |
- /** Cancel the password prompt. */ |
- cancel: function() { |
- if (this.$.dialog.open) |
- this.$.dialog.cancel(); |
- |
- // We bind setModes_ in an on-change event, so when the user hits cancel |
- // after they enter their valid password we may have authenticated them. |
- this.setModes_ = undefined; |
tommycli
2016/08/25 23:13:32
We don't care about clearing setModes_ anymore in
jdufault
2016/08/25 23:25:24
Right, the on-change event binding has been remove
|
+ /** @private */ |
+ onKeydown_: function(e) { |
+ if (e.key == 'Enter') |
+ this.checkPassword_(); |
}, |
/** |