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

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

Issue 2668693007: [MD Bookmarks] Double Click (Closed)
Patch Set: fix closure Created 3 years, 10 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/md_bookmarks/item.js ('k') | chrome/common/extensions/api/_api_features.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_bookmarks/store.js
diff --git a/chrome/browser/resources/md_bookmarks/store.js b/chrome/browser/resources/md_bookmarks/store.js
index 8f0ef849e334c115d6178bff4e4628950a34fcd8..eb4cb11c7a3cab9825505dd03faceb876fb8ba14 100644
--- a/chrome/browser/resources/md_bookmarks/store.js
+++ b/chrome/browser/resources/md_bookmarks/store.js
@@ -357,9 +357,24 @@ var BookmarksStore = Polymer({
if (!this.idToNodeMap_[id] || this.idToNodeMap_[id].url)
id = this.rootNode.children[0].id;
- var newFolder = this.idToNodeMap_[id];
- this.set(newFolder.path + '.isSelectedFolder', true);
+ var folder = this.idToNodeMap_[id];
+ this.set(folder.path + '.isSelectedFolder', true);
this.selectedId = id;
+
+ if (folder.id == this.rootNode.id)
+ return;
+
+ var parent = this.idToNodeMap_[/** @type {?string} */ (folder.parentId)];
+ while (parent) {
+ if (!parent.isOpen) {
+ this.fire('folder-open-changed', {
+ id: parent.id,
+ open: true,
+ });
+ }
+
+ parent = this.idToNodeMap_[/** @type {?string} */ (parent.parentId)];
+ }
},
/**
« no previous file with comments | « chrome/browser/resources/md_bookmarks/item.js ('k') | chrome/common/extensions/api/_api_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698