Bug 134800, Clicking on a groupmark shouldn't clobber all open tabs. r=jag sr=blake
git-svn-id: svn://10.0.0.236/trunk@211161 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
b825422654
commit
b86cfa4561
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user