Fix for blocker bug 124578, "Mailnews is dead (shows only busy cursor)"

Checking in for hidday@geocities.com, r=bzbarsky sr=bienvenu a=endico
This commit is contained in:
cbiesinger%web.de 2002-02-09 22:11:23 +00:00
parent 98afc5ee0f
commit 08b62eff33
2 changed files with 25 additions and 12 deletions

View File

@ -1121,10 +1121,16 @@ function ReloadMessage()
function SetBusyCursor(window, enable)
{
if(enable)
window.setCursor("wait");
else
window.setCursor("auto");
// setCursor() is only available for chrome windows.
// However one of our frames is the start page which
// is a non-chrome window, so check if this window has a
// setCursor method
if ("setCursor" in window) {
if (enable)
window.setCursor("wait");
else
window.setCursor("auto");
}
var numFrames = window.frames.length;
for(var i = 0; i < numFrames; i++)

View File

@ -129,15 +129,22 @@ RDF_observer =
function
SetBusyCursor(window, enable)
{
if(enable == true)
// Defensive check: setCursor() is only available for
// chrome windows. Since one of our frame might be a
// non-chrome window, make sure the window we treat has
// a setCursor method.
if("setCursor" in window)
{
window.setCursor("wait");
debug("Directory: cursor=busy\n");
}
else
{
window.setCursor("auto");
debug("Directory: cursor=notbusy\n");
if(enable == true)
{
window.setCursor("wait");
debug("Directory: cursor=busy\n");
}
else
{
window.setCursor("auto");
debug("Directory: cursor=notbusy\n");
}
}
var numFrames = window.frames.length;