Recent and Search in Bookmark manager don't allow Open operations.

In the Bookmark manager the "Open..." context menu for the Recent and Search
'folder' items will apply to all the bookmarks in the bookmark list.

BUG=180158
TEST=Confirm context menu for folder item, multiple selected bookmarks and empty bookmark list are enabled and the "Open..." launch the correct bookmarks.
R=yosin@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195282 0039d316-1c4b-4281-b951-d872f2087c98
parent c858acfa
......@@ -314,10 +314,13 @@ function handleLoadForTree(e) {
* @return {!Array.<!BookmarkTreeNode>} .
*/
function getBookmarkNodesForOpenCommands(target) {
if (target == tree)
return tree.selectedFolders;
var listItems = list.selectedItems;
return listItems.length ? listItems : list.dataModel.slice();
if (target == tree) {
var folderItem = tree.selectedItem;
return folderItem == recentTreeItem || folderItem == searchTreeItem ?
list.dataModel.slice() : tree.selectedFolders;
}
var items = list.selectedItems;
return items.length ? items : list.dataModel.slice();
}
/**
......
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