showModalDialog clears returned array

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
10 years ago
8 years ago

People

(Reporter: richard, Unassigned)

Tracking

3.0 Branch
x86
Windows Vista
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0

If the window.returnValue property is set to an associative array, the result returned from window.showModalDialog is a blank array. If the returnValue is set to an object, the result is not blank.

Reproducible: Always

Steps to Reproduce:
Page 1:
<button onclick="dumpObject(window.showModalDialog("page2.htm"));">Show Dialog</button>

Page 2:
<button onclick="closeDialog1();">Return [1]</button>
<button onclick="closeDialog2();">Return [2]</button>

closeDialog1 = function()
{
    var result = [];
    result["value"] = "Data returned from dialog";
    window.returnValue = result;
    window.close();
};
closeDialog2 = function()
{
    var result = {};
    result["value"] = "Data returned from dialog";
    window.returnValue = result;
    window.close();
};

Open page 1, show the dialog, click "Return [1]", and note the result. Show the dialog again, click "Return [2]", and note the result.
Actual Results:  
Return [1] returns an empty array. Return [2] returns the expected data.

Expected Results:  
Both methods should return the expected data, as Internet Explorer does.
(Reporter)

Comment 1

10 years ago
Created attachment 329084 [details]
Test case

Extract both files, and open "testMD.htm".
(Reporter)

Updated

10 years ago
Version: unspecified → 3.0 Branch
This is a mass search for Firefox General bugs filed against version 3.0 that are UNCO and have not been changed for 200 days.

Reporter, please update to Firefox 3.6.10 or alter. Firefox 3.0 is no longer supported and is no longer receiving updates. After you update, please create a fresh profile, http://support.mozilla.com/kb/managing+profiles, and test to see if your bug still exists. If you still the bug, then please post a comment with the version you tested against, and the problem. If the issue is no longer there, please set the RESOLUTION to  RESOLVED, WORKSFORME.
Whiteboard: [CLOSEME 2010-11-01]
(Reporter)

Updated

8 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.