Commit 2628b022 authored by aboxhall@chromium.org's avatar aboxhall@chromium.org

Check that result of bmm.loadSubtree is still the selected item before...

Check that result of bmm.loadSubtree is still the selected item before applying disabled state to commands.

BUG=230280

Review URL: https://chromiumcodereview.appspot.com/14064018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195434 0039d316-1c4b-4281-b951-d872f2087c98
parent e4c3c87a
......@@ -369,6 +369,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);
});
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment