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

Unified Diff: chrome/browser/resources/bookmark_manager/js/main.js

Issue 14064018: Check that result of bmm.loadSubtree is still the selected item before applying disabled state to c… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/bookmark_manager/js/main.js
diff --git a/chrome/browser/resources/bookmark_manager/js/main.js b/chrome/browser/resources/bookmark_manager/js/main.js
index 1cd60650e5c8e51a51dfee72c22c53bbe762ad1f..8857e9070aa976b6f65b61f3168d86b8e4e10d3e 100644
--- a/chrome/browser/resources/bookmark_manager/js/main.js
+++ b/chrome/browser/resources/bookmark_manager/js/main.js
@@ -366,6 +366,9 @@ function updateOpenCommands(e, command) {
// contain any non-folders, we need to disable the command.
var p = bmm.loadSubtree(selectedItems[0].id);
p.addListener(function(node) {
+ var selectedItems = getBookmarkNodesForOpenCommands(e.target);
+ if (node.id != selectedItems[0].id)
+ return;
command.disabled = !node || !hasBookmarks(node);
});
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698