fix for bug #51546. work around for the bug that the onselect handler

gets called twice.  this was causing the frame src to be set twice
which was interrupting the file loading from the JAR.  r=alecf,putterman
This commit is contained in:
sspitzer%netscape.com 2000-09-14 20:19:17 +00:00
Родитель b0e2b287fe
Коммит 1754edd2ef
1 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -358,13 +358,29 @@ function setEnabled(control, enabled)
control.setAttribute("disabled", true);
}
// this is a workaround for bug #51546
// the on click handler is getting called twice
var bug51546CurrentPage = null;
var bug51546CurrentServerId = null;
//
// called when someone clicks on an account
// figure out context by what they clicked on
//
function onAccountClick(tree) {
//dump("onAccountClick()\n");
var result = getServerIdAndPageIdFromTree(tree);
//dump("sputter:"+bug51546CurrentPage+","+bug51546CurrentServerId+":"+result.pageId+","+result.serverId+"\n");
if ((bug51546CurrentPage == result.pageId) && (bug51546CurrentServerId == result.serverId)) {
//dump("workaround for #51546\n");
return;
}
bug51546CurrentPage = result.pageId;
bug51546CurrentServerId = result.serverId;
if (result) {
showPage(result.serverId, result.pageId);
updateButtons(tree,result.serverId);