Closed Bug 442724 Opened 17 years ago Closed 15 years ago

dialogArguments not always passed to new window in showModalDialog

Categories

(Firefox :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: markob_mcs, Unassigned)

Details

(Whiteboard: [CLOSEME 2010-11-01])

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 The value of dialogArguments is sometimes null even when a valid array is passed to showModalDialog in it's second parameter. This is intermittent and not 100% reproducible. The most common scenario is the first call to showModalDialog yields a null dialogArguments variable in the new window, but on the second and subsequent attempts the dialogArguments value is available as passed. This seems to indicate a timing issue or possibly related to or influenced by page caching, or dependency on an internal structure that is not initialized by the first call. Note: we have tested a large variety of potential workarounds, one being to use setTimeout to wait for the dialogArguments variable to be passed. In each case, if it's not available in the javascript in the page header, it never becomes available regardless of the wait time. Observed in both FFv3.0 on Win2000 and Linux Debian - Testing (Lenny). Calling code example: var vArray = new Array(); vArray[1] = "1"; vArray[2] = "2"; if (window.showModalDialog) win = window.showModalDialog (vURL, vArray); The caller is the left-hand frame of a two frame window. Reproducible: Sometimes Steps to Reproduce: 1. Call to showModalDialog, passing an array. The caller is one of a two frame window. 2. Check for null value of window.dialogArguments in the newly created window, at either the header script or at window.onload (results are the same either way). 3. Actual Results: Fails intermittently on the first call, usually succeeds on subsequent calls. Expected Results: Should always see an initialized window.dialogArguments within the newly created window. This code has been in production for several years and has been solid on the Internet Explorer version of showModalDialog for this period. On that platform, window.dialogArguments is always passed. We've found no workaround as the test for null dialogArguments occurs inside the new window, and thus comes too late to take defensive action the user would not notice. Current solution is to inform user that the window must be closed and reopened whenever the test for dialgArguments yields null.
Could you attach a testcase for this bug with the "Add an attachment" link?
This is a mass search for bugs which are in the Firefox General component, are UNCO, have not been changed for 500 days and have an unspecified version. Reporter, can you please update to Firefox 3.6.10 or later, create a fresh profile, http://support.mozilla.com/en-US/kb/managing+profiles, and test again. If you still see the issue, please update this bug. If the issue is gone, please set the status to RESOLVED > WORKSFORME.
Whiteboard: [CLOSEME 2010-11-01]
No reply from reporter, INCOMPLETE. Please retest with Firefox 3.6.12 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.