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

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

Issue 2813503002: MD Bookmarks: Prevent navigating to invalid folders (Closed)
Patch Set: handleAction -> dispatch 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 d761f6532353608694cbc410f521a5a6be321403..d976fdcac495a51ea561ed1f228093ebfe8d6e5b 100644
--- a/chrome/browser/resources/md_bookmarks/item.js
+++ b/chrome/browser/resources/md_bookmarks/item.js
@@ -107,10 +107,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});
+ }
},
/**
« no previous file with comments | « chrome/browser/resources/md_bookmarks/folder_node.js ('k') | chrome/browser/resources/md_bookmarks/reducers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698