Closed
Bug 355373
Opened 18 years ago
Closed 18 years ago
modal window behaves like normal window - user can switch to parent window and can type text or click buttons in the parent window
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: barteku, Unassigned)
References
()
Details
Attachments
(1 file)
214 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1) Gecko/20060918 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1) Gecko/20060918 Firefox/2.0
If a modal window is opened by using the DOM:window.open
window.open('dialog.html','_blank','modal=yes')
it behaves like a normal window - a user is allowed to switch focus and return to the main window and can do anything in there (in the main/parent window).
According to your documentation (http://developer.mozilla.org/pl/docs/DOM:window.open#Window_functionality_features) if the "modal attribute is set to yes, the new window is said to be modal and the user cannot return to the main window until the modal window is closed".
Apart of that, by the definition, a modal window should not be allowed to lose focus and only a modeless window is allowed to lose focus.
Reproducible: Always
Steps to Reproduce:
1.Open a window using window.open specifying the modal=yes attribute.
2.Click on the parent window.
3.Do whatever you want in the parent window.
Actual Results:
The modal window loses focus and the user can return to the main window despite the modal window is not closed.
Expected Results:
The modal window should not lose focus so the user cannot return to the main window until the modal window is closed.
A modal window should behave like one created by the alert() function. A window created by the alert() function doesn't lose its focus.
Probably it happens on each of Windows version - on Windows 2000 for sure.
Comment 1•18 years ago
|
||
*** Bug 355377 has been marked as a duplicate of this bug. ***
Comment 2•18 years ago
|
||
It doesn't look like you took note of the note in the documentation:
Note: Starting with Mozilla 1.2.1, this feature requires the UniversalBrowserWrite privilege (bug 180048). Without this privilege, it is equivalent to dependent.
You need a signed script to get the UniversalBrowserWrite privilege.
Comment 3•18 years ago
|
||
Signed Scripts in Mozilla
http://www.mozilla.org/projects/security/components/signed-scripts.html
Comment 4•18 years ago
|
||
You don't, however, need signed scripts from file://, so if you save this testcase and open it locally, it will prompt for UniversalBrowserWrite, and then as the documentation says, open a window whose modality depends on the platform: it's quite modal on Windows, and quite non-modal on Mac.
Updated•18 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
(In reply to comment #2)
> It doesn't look like you took note of the note in the documentation:
> Note: Starting with Mozilla 1.2.1, this feature requires the
> UniversalBrowserWrite privilege (bug 180048). Without this privilege, it is
> equivalent to dependent.
>
> You need a signed script to get the UniversalBrowserWrite privilege.
>
Yes, but why does it work on Firefox 1.5.x and does not on Firefox 2.0 ?
I haven't changed anythig - I just installed new version of Firefox and my web application behaves diferently ...
Could you explain this?
Thanks in advance ...
Bartek
Comment 6•18 years ago
|
||
I guess the UniversalBrowserWrite requirement for modal windows was previously only implemented in the Suite. And only as of 2.0 has Firefox done the same thing.
Have you tested at all with the Suite or Seamonkey? I would assume they do the same thing as FF2.0.
You need to log in
before you can comment on or make changes to this bug.
Description
•