window.showModalDialog download file bug

UNCONFIRMED
Unassigned

Status

()

Toolkit
General
UNCONFIRMED
7 years ago
7 years ago

People

(Reporter: dart13, Unassigned)

Tracking

1.9.2 Branch
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E)

There is a bug in modal dialog created by window.showModalDialog function.
When you try to download a file from link inside modal dialog, download dialog opens with all fields empty, and it is frozen. You can only close it on Close button in upper right corner of a window.

Reproducible: Always

Steps to Reproduce:
Steps to Reproduce:
1. Save the following file as Click.htm

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Click Page</title>
</head>
<body>
<a href="test.ttt">test.ttt</a>
</body>
</html>

2. Save the file below as Dialog.htm

<html>
<body>
<script language="JavaScript">
function openWindow() {
   if (window.showModalDialog)
       {ret = window.showModalDialog("click.htm", '', 'dialogWidth:500px; dialogHeight:500px; scroll:no; status:no');}
   else
    alert("Upgrade Your Browser");
} 
</script>
<button onclick="openWindow();">Open Modal Dialog.</button>
</body>
</html>

3. Create text file 'test.ttt' with text "Firefox jumps over lazy dog!" inside the file.

4. Open the file dialog.htm and click the link 'test.ttt'.
Actual Results:  
File download dialog opens, but it is frozen. Buttons do not work, all fields like "which is a", "from", "save as" etc., are empty.

Expected Results:  
File download dialog opens asking you to save 'test.ttt' file to you local computer. 'OK' and 'Cancel' buttons provide default functionality.
(Reporter)

Updated

7 years ago
Version: unspecified → 3.6 Branch
Reporter, the test case you provided is broken. On pressing the button nothing happens. Please attach this testcase as a .zip archive or make another testcase.
Thanks.
Component: General → General
Product: Firefox → Toolkit
QA Contact: general → general
Version: 3.6 Branch → 1.9.2 Branch
(Reporter)

Comment 2

7 years ago
(In reply to comment #1)
> Reporter, the test case you provided is broken. On pressing the button nothing
> happens. Please attach this testcase as a .zip archive or make another
> testcase.
> Thanks.

It is broken because of the javascript function openWindow()
this string should be in one line (without new line char)

'dialogWidth:500px; dialogHeight:500px; scroll:no; status:no'
(Reporter)

Comment 3

7 years ago
Created attachment 514335 [details]
test case - fixed new line char in javascript string
(Reporter)

Comment 4

7 years ago
Comment on attachment 514335 [details]
test case - fixed new line char in javascript string

>PK����ûW>‘Y¢¨û���‰��
>���dialog.htmmP=OÃ0Ý#å?œ¼$‘P܅%_b`AL¨b4ñ5q1vä\H«ªÿǦ‚KÖݽ»³ß{ÍHŸºK“fD!»†‡àËw+Ï[œ{§&:OØ2Âñ£øe~ఘž”5`'4{e¤]ó.i�ê�ù ríúl¥ÐJh;¡¿‹C‚þËY¯UÿQzŽì²Ì_{%i¬îw»éTC„žP
#Ý0OÐj]ëS´Ì>͊úþE=c$ 4:ÊÙë48!ÞìâàÁÙuFNJ:M®à-àQmpe!Ú´šÀ«e¿^Tõ׬{ñ%)µ”
ÛÛ;üf/ÿ±?M¾PK
>�����TjV>�nÈ���������test.tttFirefox jumps over lazy dog!PK����ŒjV>cVŒv���™���	���click.htm5A
>Â0D÷‚wøä�ùˆ«Èo6^À+ÄöÛS+í@êíM¬ÍÃF"ÆDë˜^Kc"ð¾0çœm>Ûiîùäœãµ2†üñ QCWœŠ’úkÚ'ÝB¯Â[S0þsrŸºOõ@qÖGc ,�ã÷$~‹äzVÂPK�����ûW>‘Y¢¨û���‰��
>�������� �€����dialog.htmPK�
>�����TjV>�nÈ�������������� �€#��test.tttPK�����ŒjV>cVŒv���™���	�������� �€e��click.htmPK������¥�������
Attachment #514335 - Attachment mime type: text/html → application/octet-stream
You need to log in before you can comment on or make changes to this bug.