bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

Opening two windows using window.showModalDialog, then window.open causes Firefox to freeze

Assigned to



Widget: Cocoa
7 years ago
6 years ago


(Reporter: Olle Harju, Assigned: smichaud)


6 Branch
Mac OS X

Firefox Tracking Flags

(Not tracked)





7 years ago
Open window with window.showModalDialog. From modal dialog window open window with window.open. Close this second window.

The mouse doesn't work in the first window(window.showModalDialog) and app seems frozen.

See url for example and description to repeat issue on Mac: http://beta.backbone.se/tools/testOpenWindowBugOnFF/index.htm

Funny thing is the keyboard works in the "frozen" window, and you can open a new window by File/New Window, and in that window the mouse works.
But the in Window 1 the mouse cannot be used, and all windows belonging to that "window session" are in all practical sense, unusable. 

Second window should have closed and not freeze the first window that was opened with showModalDialog

 - Tried window.open with different parameters on size, window name etc.
 - Tried to open different pages into new window, internal and external pages like Google.
 - Took away all other attributes and events from the button triggering the open window call (ie onfocus, onblur etc).
 - Created an own test page to test open several windows in a row using window.open.
 - Disabled a lot of JavaScript code from the opener.
 - Disabled all the Add-Ons in FireFox.
 - Checked FireBug for errors (it's also hard since that freezes as well!)
 - Also tested modal vs non-modal windows.

None of the above did hinder the freezing to happen. One thing if the new page is opened in a new tab insead of a new window no freezing occurs. Search on the net gives hits with similar problems - there are a few posts on similar issues but no real solutions, just suggestions to disable add-ons, anti virus etc. Some even said that the only way is to revert to an earlier version - but if you do that FF autoupdates itself later on.
The URL times out for me

Comment 2

7 years ago
Changed URL to the example since the former didn´t work.

Please have a look again.
Component: General → Widget: Cocoa
Product: Firefox → Core
QA Contact: general → cocoa

Comment 3

7 years ago
De-shouting summary.
Summary: MAC FIREFOX 6.0 DIALOGMODAL FREEZE ON MAC → Opening two windows using window.showModalDialog, then window.open causes Firefox to freeze

Comment 4

7 years ago
Olle, did this only start happening with Firefox 6, or does Firefox 5 (or 4) exhibit the same problem?

How about newer Firefox versions (8, 9, 10; I believe these are all still in various pre-release stages so you might want to test in a clean user account to avoid messing with your normal profile)?

Comment 5

7 years ago
@Chris: The issue have been reported to us before version 6 of FF. The issue is Mac related and do not occure on PC.

Comment 6

7 years ago
That didn't really answer my second question...does this happen in the most recent (pre-release) versions of Firefox?

Comment 7

6 years ago
The issue is reproducing for me on:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0a1) Gecko/20111128 Firefox/11.0a1 using the URl from comment2

Comment 8

6 years ago
I can also reproduce this (testing with FF 8.0.1 on OS X 10.6.8).

I need to dig further to be sure, but right now I suspect this bug (along with several others) is the result of a design flaw in how we implemented showModalDialog() on OS X.  For that reason it won't be easy to work around, and probably won't be fixed quickly.

In the meantime, the workaround (as best I can tell) is never to open a window/dialog from a window created using showModalDialog(), or simply not to use showModalDialog().
Assignee: nobody → smichaud
Ever confirmed: true

Comment 9

6 years ago
As I explain in much greater detail at bug 478073, modal windows/dialogs work differently on OS X than on Windows or Linux.  So some behaviors (particularly having to do with window-modal dialogs) that we take for granted on Windows and Linux are difficult or impossible on OS X.

In the past I've tried to hack around these difficulties.  But this is very tricky work, and I was never allowed to finish it (see bug 468393).  Hence this bug and others like it.

I now think we need to undo my hacks, and accept that modal dialogs work differently on OS X than they do on Windows or Linux.  Among other things, this means that the dialog displayed using showModalDialog() will either need to be a sheet (as it was before the patch for bug 395465 landed), or if it's a window it will need to be app-modal (not window-modal).

Comment 10

6 years ago
I have the same problem when the windows are opened in the opposite order: a "standard" secondary window is opened first, from which a dialog window is opened. After closing the dialog window, the secondary window is frozen. Seen in FF 10 and 15, on Mac OS X only.
You need to log in before you can comment on or make changes to this bug.