зеркало из https://github.com/mozilla/pjs.git
Bug 134800, Clicking on a groupmark shouldn't clobber all open tabs. r=jag sr=blake
This commit is contained in:
Родитель
84bf60fccc
Коммит
c5db5e9839
|
@ -644,16 +644,12 @@ function OpenBookmarkGroupFromResource(resource, datasource, rdf) {
|
|||
var tabPanels = gBrowser.mPanelContainer.childNodes;
|
||||
var tabCount = tabPanels.length;
|
||||
var index = 0;
|
||||
while (containerChildren.hasMoreElements()) {
|
||||
for (; containerChildren.hasMoreElements(); ++index) {
|
||||
var res = containerChildren.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
|
||||
var target = datasource.GetTarget(res, urlResource, true);
|
||||
if (target) {
|
||||
var uri = target.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
|
||||
if (index < tabCount)
|
||||
tabPanels[index].loadURI(uri, null, nsIWebNavigation.LOAD_FLAGS_NONE);
|
||||
else
|
||||
gBrowser.addTab(uri);
|
||||
index++;
|
||||
gBrowser.addTab(uri);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -662,11 +658,7 @@ function OpenBookmarkGroupFromResource(resource, datasource, rdf) {
|
|||
|
||||
// Select the first tab in the group.
|
||||
var tabs = gBrowser.mTabContainer.childNodes;
|
||||
gBrowser.selectedTab = tabs[0];
|
||||
|
||||
// Close any remaining open tabs that are left over.
|
||||
for (var i = tabCount-1; i >= index; i--)
|
||||
gBrowser.removeTab(tabs[i]);
|
||||
gBrowser.selectedTab = tabs[tabCount];
|
||||
}
|
||||
|
||||
function OpenBookmarkURL(node, datasources)
|
||||
|
|
Загрузка…
Ссылка в новой задаче