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

Unified Diff: chrome/browser/resources/md_bookmarks/edit_dialog.js

Issue 2769103002: MD Bookmarks: Save and close bookmark edit dialog on 'enter' key press. (Closed)
Patch Set: Closure 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
Index: chrome/browser/resources/md_bookmarks/edit_dialog.js
diff --git a/chrome/browser/resources/md_bookmarks/edit_dialog.js b/chrome/browser/resources/md_bookmarks/edit_dialog.js
index c2a4873c3d14be119985ea00120d3158e52e2efe..6f7bccdd4546838822246e5a0aa1f0bdf69adf80 100644
--- a/chrome/browser/resources/md_bookmarks/edit_dialog.js
+++ b/chrome/browser/resources/md_bookmarks/edit_dialog.js
@@ -5,6 +5,10 @@
Polymer({
is: 'bookmarks-edit-dialog',
+ behaviors: [
+ Polymer.IronA11yKeysBehavior,
+ ],
+
properties: {
/** @private {BookmarkNode} */
editItem_: Object,
@@ -19,6 +23,10 @@ Polymer({
urlValue_: String,
},
+ keyBindings: {
+ 'enter': 'onSaveButtonTap_',
+ },
+
/** @param {BookmarkNode} editItem */
showEditDialog: function(editItem) {
this.editItem_ = editItem;
@@ -43,7 +51,6 @@ Polymer({
/** @private */
onSaveButtonTap_: function() {
- // TODO(tsergeant): Save changes when enter is pressed.
// TODO(tsergeant): Verify values.
var edit = {'title': this.titleValue_};
if (!this.isFolder_)
« no previous file with comments | « chrome/browser/resources/md_bookmarks/edit_dialog.html ('k') | chrome/test/data/webui/md_bookmarks/edit_dialog_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698