window.close() is not working for window opened by script

RESOLVED INVALID

Status

()

Core
General
RESOLVED INVALID
11 years ago
11 years ago

People

(Reporter: abhijeet, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

I have opened a window through window.open() and trying to close window using  window.close() in javascript is not working in Mozilla 2.0.0.11 

line on Default.aspx
<a href="javascript:window.open('Default2.aspx','_self');">Open Window</a>

line on Default2.aspx
<a href="javascript:window.close();">Close Window</a>

not working in mozilla 2.0.0.11,

it works yesterday but today its not working 


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Actual Results:  
step 1) make new website project  in Visual studio 2005 

step 2) add line on Default.aspx
 <a href="javascript:window.open('Default2.aspx','_self');">Open Window</a>

step3) add new aspx page 
add line on Default2.aspx
<a href="javascript:window.close();">Close Window</a>

run the project and it is not working in mozilla 2.0.0.11,




Expected Results:  
window.close() must be work for window which has been opened by window.open()
Bug 212298 ?
Component: General → General
Product: Firefox → Core
QA Contact: general → general
(Reporter)

Comment 2

11 years ago
Bug 212298 
link not available to test
http://www.mxstudio.homeschool.pl/testy/close.html

please note that problem is with Mozilla Forefox 2.0.0.11 

(Reporter)

Comment 3

11 years ago
Created attachment 293096 [details]
First HTML page
try in Mozilla FireFox 2.0.0.11 only 

Open this HTML first
(Reporter)

Comment 4

11 years ago
Created attachment 293097 [details]
second HTML page

save this HTML file on same path where HTML1.html is saved, and open Html1.html first
(Reporter)

Updated

11 years ago
Attachment #293096 - Attachment description: First HTML page → First HTML page try in Mozilla FireFox 2.0.0.11 only
Ah, you're opening into _self.  That shouldn't make the current window closeable unless you opened it to start with.  As Ria said, see bug 212298.
Blocks: 212298
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.