Closed Bug 691702 Opened 13 years ago Closed 5 years ago

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

Categories

(Core :: Widget: Cocoa, defect)

6 Branch
x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: olle.harju, Assigned: smichaud)

References

()

Details

WHAT DID YOU DO?
Open window with window.showModalDialog. From modal dialog window open window with window.open. Close this second window.


WHAT HAPPENED?
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. 


WHAT SHOULD HAVE HAPPENED?
Second window should have closed and not freeze the first window that was opened with showModalDialog


TRIED SOLUTIONS
 - 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
Changed URL to the example since the former didn´t work.
http://demo.backbone.se/tools/testOpenWindowBugOnFF/index.htm

Please have a look again.
Component: General → Widget: Cocoa
Product: Firefox → Core
QA Contact: general → cocoa
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
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)?
@Chris: The issue have been reported to us before version 6 of FF. The issue is Mac related and do not occure on PC.
That didn't really answer my second question...does this happen in the most recent (pre-release) versions of Firefox?
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
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
Status: UNCONFIRMED → NEW
Ever confirmed: true
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).
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.

The showModalDialog API was disabled in Firefox 56 and removed later on. As a result, I believe this bug is no longer present in (more) recent versions of Firefox. Please reopen and needinfo me if you think this bug is still relevant.

Bugmail filter: showModalDialogClosure.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.