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

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

Issue 2668693007: [MD Bookmarks] Double Click (Closed)
Patch Set: change the loop and add tab changes 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
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..764d18b80444ac0824183c57182fd5a62acc7e2f 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_[folder.parentId];
+ while (parent) {
+ if (!parent.isOpen) {
+ this.fire('folder-open-changed', {
+ id: parent.id,
+ open: true,
+ });
+ }
+
+ parent = this.idToNodeMap_[parent.parentId];
+ }
},
/**

Powered by Google App Engine
This is Rietveld 408576698