mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 10:08:41 +00:00
Bug 432366 - Paste of bookmark on "Bookmarks Menu" in sidebar causes "Recently Bookmarked" folder to expand. r=dietrich.
This commit is contained in:
parent
3b13e2d585
commit
191f5d8909
@ -763,7 +763,7 @@ PlacesController.prototype = {
|
||||
// select the new item
|
||||
var insertedNodeId = PlacesUtils.bookmarks
|
||||
.getIdForItemAt(ip.itemId, ip.index);
|
||||
this._view.selectItems([insertedNodeId], ip.itemId);
|
||||
this._view.selectItems([insertedNodeId], false);
|
||||
}
|
||||
},
|
||||
|
||||
@ -783,7 +783,7 @@ PlacesController.prototype = {
|
||||
// select the new item
|
||||
var insertedNodeId = PlacesUtils.bookmarks
|
||||
.getIdForItemAt(ip.itemId, ip.index);
|
||||
this._view.selectItems([insertedNodeId]);
|
||||
this._view.selectItems([insertedNodeId], false);
|
||||
}
|
||||
},
|
||||
|
||||
@ -799,7 +799,7 @@ PlacesController.prototype = {
|
||||
// select the new item
|
||||
var insertedNodeId = PlacesUtils.bookmarks
|
||||
.getIdForItemAt(ip.itemId, ip.index);
|
||||
this._view.selectItems([insertedNodeId]);
|
||||
this._view.selectItems([insertedNodeId], false);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1234,7 +1234,7 @@ PlacesController.prototype = {
|
||||
insertedNodeIds.push(PlacesUtils.bookmarks
|
||||
.getIdForItemAt(ip.itemId, ip.index + i));
|
||||
if (insertedNodeIds.length > 0)
|
||||
this._view.selectItems(insertedNodeIds);
|
||||
this._view.selectItems(insertedNodeIds, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -585,7 +585,14 @@
|
||||
-->
|
||||
<method name="selectItems">
|
||||
<parameter name="aIDs"/>
|
||||
<parameter name="aOpenContainers"/>
|
||||
<body><![CDATA[
|
||||
// By default, we do search and select within containers which were
|
||||
// closed (note that containers in which nodes were not found are
|
||||
// closed).
|
||||
if (aOpenContainers === undefined)
|
||||
aOpenContainers = true;
|
||||
|
||||
var ids = aIDs; // don't manipulate the caller's array
|
||||
|
||||
// Array of nodes found by findNodes which are to be selected
|
||||
@ -625,8 +632,11 @@
|
||||
nodesURIChecked.indexOf(node.uri) != -1)
|
||||
return foundOne;
|
||||
|
||||
nodesURIChecked.push(node.uri);
|
||||
asContainer(node);
|
||||
if (!aOpenContainers && !node.containerOpen)
|
||||
return foundOne;
|
||||
|
||||
nodesURIChecked.push(node.uri);
|
||||
|
||||
// Remember the beginning state so that we can re-close
|
||||
// this node if we don't find any additional results here.
|
||||
|
Loading…
x
Reference in New Issue
Block a user