Open Bug 450591 Opened 13 years ago Updated 12 years ago

[Mac] Main window's menu can be used even if a modal dialog is open

Categories

(Core :: Widget: Cocoa, defect, P3)

1.9.0 Branch
PowerPC
macOS
defect

Tracking

()

People

(Reporter: ecfbugzilla, Assigned: smichaud)

References

Details

This issue affects both Firefox and TomTom HOME, so it is a platform problem. Usually, when a modal dialog is open, main window's menu disappears and cannot be used. To test either type "javascript:alert('foo')" in the location bar or go to Tools / Clear Private Data.

However, with a trick you can still access the menu of the main window. Bring a window of some other application in foreground. Now bring Firefox in foreground again by dragging the title bar of the main window (move the window slightly). Now Firefox is in the foreground again, and the menu displayed is the menu of the main window.

I tried clicking some menu items, none of them seem to cause real issues when used with a modal dialog open - but maybe I just missed something.
Can't reproduce on Linux with Firefox 3.
Oh, this is Mac only?
Summary: Main window's menu can be used even if a modal dialog is open → [Mac] Main window's menu can be used even if a modal dialog is open
It is filed in the component "Widget: Mac" - yes, this is a Mac-specific issue. Modal dialogs work very differently on other platforms.
Yes, next time, please make it clear in the title and description, too. as the bugzilla fields by default are filled based on the OS of the filer.
This only happens with FF3 (which uses Cocoa widgets).  So this is a Widget: Cocoa bug.
Component: Widget: Mac → Widget: Cocoa
QA Contact: mac → cocoa
Furthermore, this only happens with Gecko modal windows (e.g. what
"javascript:alert('foo');" displays), and not with native modal
dialogs (e.g. what's displayed when you choose File : Open).

But it's a real problem ... and it probably won't be easy to solve.
Assignee: joshmoz → smichaud
Flags: wanted1.9.1?
Priority: -- → P3
The behavior in comment 0 isn't clearly a bug; it's part of the way menus and modality work on Mac OS X (actually, the fact that most of the menus disappear when a modal dialogue or sheet appear *is* the bug).

When a modal appears on Mac OS X, 

1) All open menus should close, and 
2a) Menu items which should not be available should be disabled (document modal, e.g. sheets), or
2b) All application menus should be disabled but should still appear or, all items in all application menus should be disabled (application modal, e.g. the Mac OS X Print dialogue, but not the Mac OS X Print sheet, which is document modal)

The only bug I can see here (other than the menus vanishing in the first place) is that 

1) perhaps some menu items are still enabled that shouldn't be in the javascript sheet (document modal) case--I didn't check carefully

2) *if* the Clear Private Data window is supposed to be application modal (I'm not sure if it is), it isn't application modal.

Either one is a separate bug; since this bug is conflating document modal and application modal examples/STR, it's hard to tell which one is the complaint.
(In reply to comment #7)

You may be right about everything else you say, but I still think the
following is a bug:

1) Enter "javascript:about('foo');" in the location bar.

   An app-modal dialog (alert box) will appear, and all of the main
   menu but "Firefox" will disappear.

2) Click on the desktop -- FF 3 will lose focus.

3) Click again on the app-modal dialog or its window.

   The main menu will now include everything it did before step 1.

You may think it's incorrect for most of the main menu to disappear in
step 1.  But either way, the main menu should look the same after step
3 as it does after step 1.

It's true we also need to deal with the question of how "Gecko modal"
dialogs should work.  But any modal dialog should disable at least
_some_ of the main menu choices -- otherwise it wouldn't be modal.

Side note:  The only way I know of to implement "document modal" (or
window modal) dialogs is to use sheets.
(In reply to comment #7)
In Safari the menu is still visible while a modal dialog is open - but it is disabled. Maybe that's how it should work for Firefox as well, the important thing is however that the menu shouldn't be accessible from a modal dialog, no matter how that is achieved. That's the bug described in comment 0.
Flags: wanted1.9.1? → wanted1.9.1+
You need to log in before you can comment on or make changes to this bug.