Closed Bug 14687 Opened 21 years ago Closed 20 years ago

modal window does not go away when bad JS called

Categories

(Core :: XUL, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: alecf, Assigned: danm.moz)

Details

I had some code that looked like this:

function MsgAccountManager()
{
    window.openDialog("chrome://messenger/content/AccountManager.xul",
                      "AccountManager", "chrome,modal");
    refreshFolderPane();
}


function refreshFolderPane()
{
    var folderTree = GetFolderTree();
    if (folderTree) {
        tree.clearItemSelection();                  <--- error here
        var root = folderTree.getAttribute('ref');
        folderTree.setAttribute('ref', root);
    }
}

and refresh folder pane had simply some bad javascript (I was trying to
reference a bad variable, notice that "tree" doesn't exist)

When I did this, the window that I opened never actually closed...doh! the
content disappeared, but this zombie window stuck around until I closed it with
the window manager

CC'ing dan and david because they may know more about why this is happening.
Assignee: trudelle → danm
Possibly a dup of one of dcone's 'zombie window' bugs?  assigning to danm for
triage.
QA Contact: beppe → claudius
Status: NEW → ASSIGNED
Target Milestone: M14
Hopefully this was a dupe of one the zombie bugs. Can't reproduce today. The 
sample code given is difficult to run; I think the security code probably objects 
to the chrome URL. But I copied AccountManager.xul to the same directory in which 
I put this file:
<html><head><script>
function mbd() {
    window.openDialog("AccountManager.xul","_blank","chrome,modal");
    tree.clearItemSelection();
}
</script></head><body>
<form><input type=button value="make bad dialog" onclick="mbd()"></form>
</body>
</html>

which, when operated, does mumble something about the "tree" property not being 
defined, as expected. But the AccountManager dialog seems well behaved 
nevertheless. Closing.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
wow, yeah, it's been a while, but I think this bug is long gone :)
makring VERIFIED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.