Closed Bug 302902 Opened 19 years ago Closed 19 years ago

window.close() closes the whole window instead of the tab


(Core :: DOM: Core & HTML, defect)

Windows 98
Not set





(Reporter: sync2d, Assigned: jst)




(Keywords: dataloss, regression, verified1.8)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b4) Gecko/20050731 Firefox/1.0+

In latest trunk, window.close() closes the whole window instead of the tab. 
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b4) Gecko/20050730 Firefox/1.0+
is fine. bug 296639 is very suspicious...

Reproducible: Always

Steps to Reproduce:
1. navigate the browser to:
javascript: w=open(); setTimeout("w.close()", 0); void 0;

Actual Results:  
the whole window closes.

Expected Results:  
only the tab opened by open() closes.
This bug is also happining on Linux. Script closing tab crashes browser. Manual
close of tab is ok. Build is 20050801
Adding dataloss keyword (if there is unsaved form data in one of the other tabs).
Severity: normal → critical
Keywords: dataloss
Keywords: regression
confirming.  I see this on Win2k SP4 in Seamonkey

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b4) Gecko/20050731

Ever confirmed: true
Assignee: general → jst
Flags: blocking1.8b4+
I think this is the same bug, Seamonkey using 20050801 build I have it open in
new window. If a URL on a web-page takes you to a new window and when your done
and close that window out and go back to the original window I am get a crash
when I try to go either foward or back on the original main window. I switched
browsers so Firefox opened in new window and Seamonkey opened up a new tap. both
do the same things. Neither do this prior to the splitwindow patch. 
No longer blocks: splitwindows
William, is there a reason you removed the dependency?
Blocks: splitwindows
(In reply to comment #5)
> William, is there a reason you removed the dependency?
I did not remove it. The only thing I can think of is when I went to hit commit
I got a error message saying someone else was at the same time trying to make
changes at the sametime. That I could delete what I just wrote and go back to
302902 bug or try sending again. I hit send again. Maybe that caused the
dependency to be deleted or not get posted? Also maybe this helps but I tried on
my Apple with OSX 10.4 and with build 20050801 and it works great. It does not
crash either way as mentioned above on my Linux computer. 

I have been trying both Firefox and Seamonkey builds 20050802 with the changes
done to the split windows patch. Both are been very stable.
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b4) Gecko/20050802 Firefox/1.0+
works fine. fixed by bug 302889.
Closed: 19 years ago
Depends on: 302889
Resolution: --- → FIXED
*** Bug 303529 has been marked as a duplicate of this bug. ***
Fixed on the trunk before we branched for 1.8.
Keywords: fixed1.8
Keywords: fixed1.8verified1.8
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.