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..71e9c7094b3bfc81062df273ad0458e91e91e9a9 100644 |
--- a/chrome/browser/resources/settings/people_page/password_prompt_dialog.js |
+++ b/chrome/browser/resources/settings/people_page/password_prompt_dialog.js |
@@ -90,25 +90,24 @@ Polymer({ |
return; |
} |
+ if (this.$.dialog.open) |
+ return; |
+ |
this.$.dialog.showModal(); |
}, |
- /** Close the dialog. */ |
- close: function() { |
+ /** @private */ |
+ onCancelTap_: function() { |
if (this.$.dialog.open) |
this.$.dialog.close(); |
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; |
+ /** @private */ |
+ onKeydown_: function(e) { |
+ if (e.key == 'Enter') |
+ this.checkPassword_(); |
}, |
/** |
@@ -150,7 +149,7 @@ Polymer({ |
this.clearAccountPasswordTimeout_ = setTimeout( |
clearSetModes.bind(this), PASSWORD_ACTIVE_DURATION_MS); |
- this.close(); |
+ this.$.dialog.close(); |
tommycli
2016/08/25 23:34:25
You no longer wish to clear the password_ member v
jdufault
2016/08/25 23:45:39
Added clarifying comment.
|
} |
} |