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

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

Issue 2813503002: MD Bookmarks: Prevent navigating to invalid folders (Closed)
Patch Set: Add positive test case Created 3 years, 8 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/item.js
diff --git a/chrome/browser/resources/md_bookmarks/item.js b/chrome/browser/resources/md_bookmarks/item.js
index 73b606a3c237cb3fd7b1a00e64a39f68e9d55b4f..7afc3e9bcad608879993036cef55e2458aa39a15 100644
--- a/chrome/browser/resources/md_bookmarks/item.js
+++ b/chrome/browser/resources/md_bookmarks/item.js
@@ -97,10 +97,12 @@ Polymer({
* @private
*/
onDblClick_: function(e) {
- if (!this.item_.url)
- this.dispatch(bookmarks.actions.selectFolder(this.item_.id));
- else
+ if (!this.item_.url) {
+ this.dispatch(
+ bookmarks.actions.selectFolder(this.item_.id, this.getState().nodes));
+ } else {
chrome.tabs.create({url: this.item_.url});
+ }
},
/**

Powered by Google App Engine
This is Rietveld 408576698