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

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

Issue 2783063002: [MD settings] done button in passwords dialog as action button (Closed)
Patch Set: Created 3 years, 9 months 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 | « chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html ('k') | 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/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();
},
});
« no previous file with comments | « chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698