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

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

Issue 2926233002: MD Bookmarks: Add right-click context menu to sidebar folders (Closed)
Patch Set: Created 3 years, 6 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/folder_node.js
diff --git a/chrome/browser/resources/md_bookmarks/folder_node.js b/chrome/browser/resources/md_bookmarks/folder_node.js
index a3fc65806de5b0d4bdb58c6019347be16e9c90d9..9b130bdde5067e23d9ce8b13db0b0ace89809b77 100644
--- a/chrome/browser/resources/md_bookmarks/folder_node.js
+++ b/chrome/browser/resources/md_bookmarks/folder_node.js
@@ -256,7 +256,18 @@ Polymer({
/** @private */
selectFolder_: function() {
this.dispatch(
- bookmarks.actions.selectFolder(this.item_.id, this.getState().nodes));
+ bookmarks.actions.selectFolder(this.itemId, this.getState().nodes));
+ },
+
+ /**
+ * @param {!Event} e
+ * @private
+ */
+ onContextMenu_: function(e) {
+ e.preventDefault();
+ this.selectFolder_();
calamity 2017/06/13 05:54:25 This clears the current selection in the list. Is
tsergeant 2017/06/13 07:01:54 Yeah, this is intentional (and matches the old BMM
calamity 2017/06/15 03:48:52 Sorry, I mean it clears the current selection in t
tsergeant 2017/06/15 05:50:26 Ah, I see. This was a problem with just left-click
+ bookmarks.CommandManager.getInstance().openCommandMenuAtPosition(
+ e.clientX, e.clientY, new Set([this.itemId]));
},
/**
@@ -274,7 +285,7 @@ Polymer({
*/
toggleFolder_: function(e) {
this.dispatch(
- bookmarks.actions.changeFolderOpen(this.item_.id, this.isClosed_));
+ bookmarks.actions.changeFolderOpen(this.itemId, this.isClosed_));
e.stopPropagation();
},

Powered by Google App Engine
This is Rietveld 408576698