зеркало из https://github.com/mozilla/pjs.git
Bug 432366 - Paste of bookmark on "Bookmarks Menu" in sidebar causes "Recently Bookmarked" folder to expand. r=dietrich.
This commit is contained in:
Родитель
186160143d
Коммит
624fb67ae8
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче