128322 - history sidebar opens topmost link automatically. patch by neil and me. r=andreww/hewitt sr=blake/hewitt

This commit is contained in:
blakeross%telocity.com 2006-07-27 14:56:57 +00:00
parent e184ed27d1
commit 8ba8272c8d

View File

@ -128,18 +128,17 @@ function historyOnClick(aEvent)
var col = { };
var elt = { };
gHistoryTree.treeBoxObject.getCellAt(aEvent.clientX, aEvent.clientY, row, col, elt);
if (row.value >= 0 && col.value && elt.value != "twisty" && isContainer(gHistoryTree, row.value))
if (row.value >= 0 && col.value) {
if (!isContainer(gHistoryTree, row.value))
OpenURL(false);
else if (elt.value != "twisty")
gHistoryTree.treeBoxObject.view.toggleOpenState(row.value);
}
}
}
function historyOnSelect()
{
if (!gHistoryStatus) {
OpenURL(false);
return;
}
// every time selection changes, save the last hostname
gLastHostname = "";
gLastDomain = "";