Chromium Code Reviews| Index: chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js |
| diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js b/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js |
| index bfa1e2d283934a8ab457b62192c836d1dac2ad9c..3bca4fedca62f6c1ca5bbf6350b28c21521b778a 100644 |
| --- a/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js |
| +++ b/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js |
| @@ -70,6 +70,15 @@ Polymer({ |
| }, |
| /** |
| + * @param {!KeyboardEvent} e |
| + * @private |
| + */ |
| + onKeypress_: function(e) { |
| + if (e.key == 'Enter' && !this.$.actionButton.disabled) |
| + this.onActionButtonTap_(); |
| + }, |
| + |
| + /** |
| * Handler for tapping the show/hide button. Will fire an event to request the |
| * password for this login pair. |
| * @private |
| @@ -82,19 +91,10 @@ Polymer({ |
| }, |
| /** |
| - * Handler for tapping the 'cancel' button. Should just dismiss the dialog. |
| - * @private |
| - */ |
| - onCancelButtonTap_: function() { |
| - this.close(); |
| - }, |
| - |
| - /** |
| - * Handler for tapping the save button. |
| + * Handler for tapping the 'done' button. Should just dismiss the dialog. |
| * @private |
| */ |
| - onSaveButtonTap_: function() { |
|
hcarmona
2017/03/30 16:35:03
Thanks for removing dead code :-)
|
| - // TODO(hcarmona): what to save? |
| + onActionButtonTap_: function() { |
| this.close(); |
| }, |
| }); |