window.close() shuts down browser window with no warning

VERIFIED DUPLICATE of bug 32571

Status

()

--
major
VERIFIED DUPLICATE of bug 32571
17 years ago
16 years ago

People

(Reporter: asmozilla2, Assigned: asa)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

17 years ago
Just going to this url will close the browser window, no warning or anything.

Any other windows will continue as before. If you have multiple tabs open, it
will still shut down the entire window, not just the tab.

I had my prefs set to reopen the last url visited - which was this url, so every
time I opened Mozilla it instantly shut right back down.

So MAKE SURE to have other Mozilla windows open before going to this url. (And
then click on some other link in the other window, to reset your last url.)

Comment 1

17 years ago
Reporter: Please always specify which "Build ID" you are using,
as found in the title bar of the main Mozilla window.

Comment 2

17 years ago
Build ID: 2002 01 30 03. Windows 2000.

WFM.
(Reporter)

Comment 3

17 years ago
Build ID: 2001122108

I tried to set it in the version drop down, but all it had was "Other".

I did some more investigation, for various reasons my proxy server is returning
this page as a window.close() script instead of the real page.

So; this bug is actually: when opening a page with a window.close() script in
it, Mozilla shuts down the window without asking the user first. Per the spec:
the browser needs to ask permission to close the window, unless the window was
created in a script.

This is also related to bug 103452.

I will attach a small page with a window.close in it to demonstrate.
Severity: critical → major
Component: Browser-General → JavaScript Engine
Summary: shuts down browser window instantly - with no warning → window.close() shuts down browser window with no warning
(Reporter)

Comment 4

17 years ago
Created attachment 67462 [details]
window.close() demonstration
(Reporter)

Comment 5

17 years ago
Created attachment 67466 [details]
Open child window with window.close() in it
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
duplicate of "close() can close windows it doesn't own"

*** This bug has been marked as a duplicate of 32571 ***
(Reporter)

Comment 7

16 years ago
Verifying.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.