Closed Bug 292598 Opened 20 years ago Closed 20 years ago

modal windows are not javascript-modal

Categories

(Firefox :: General, defect)

x86
Windows Server 2003
defect
Not set
major

Tracking

()

VERIFIED DUPLICATE of bug 197351

People

(Reporter: mathertel, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

When opening a new html window with window.open() using the "modal" option the
javascript that opens the window continues without halting and waiting until the
modal window is closed.
This functionality is needed to make rich featured requests to the user, better
than window.alert() or window.prompt().

Reproducible: Always

Steps to Reproduce:
  var o = document.getElementById("OUT");
  o.textContent = "before";
  var opts =
"menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=740,height=480,dialog=yes,modal=yes,alwaysRaised=yes,dependent=yes,titlebar=no";
  var w = window.open("test_dialog1.htm", "_blank", opts);
  o.textContent = "after";

Actual Results:  
The window will be opened but the script continues running and "after" will be
displayed in the OUT object.
You can still use the page in the background while the "modal" window is open.

Expected Results:  
window.open should not return until the modal window is closed.


First of all a modal call MUST be modal. It is not in the current build.

Suggestion:
Allow window.openDialog() (IE: showModalDialog) to be used from html/javascript
pages.
This Suggestion all is non standard - I know - but it is extremly important to
effectively write rich internet applications.
Because theis call also blocks the current displayed page it cannot be used to
popUp ads.

*** This bug has been marked as a duplicate of 197351 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
This is not a duplicate.

Modal does not only mean, that the window behind will not get any input or new 
events while the modal window is open.
We also need that the running script engine in the opening window stops and 
waits until the modal window is closed.

What is the right Product/Component for this bug ?
Status: VERIFIED → UNCONFIRMED
Resolution: DUPLICATE → ---
Please read the whole bug before you jump to conclusions.

This is by design, you need to gain permission from the user to open a truly
modal window, see bug 180048.  There's a way to do what you want to do, but
since it's ripe for abuse it requires a bit of user interaction.  We removed it
precisely because of the fact that people _were_ using it on popups.

*** This bug has been marked as a duplicate of 197351 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.