Closed Bug 74791 Opened 25 years ago Closed 25 years ago

window.close() can close root navigator window

Categories

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

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 32571

People

(Reporter: mwalker, Assigned: jst)

Details

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.18 i686; en-US; 0.8.1) Gecko/20010326 BuildID: 2001032614 window.close() is capable of closing a root navigator window without asking for permission. Without asking, it should only be able to close a window that was opened with window.open(). This can cause problems if a script is designed to run both in a popup and in a root window, with the ability to close the popup. Reproducible: Always Steps to Reproduce: 1. Make a document with: '<script>window.close();</script>'. 2. Open it. Actual Results: It closes your browser, even if it's the only window open. Expected Results: Popped up a dialog asking if you wanted to close the window. This behavior has changed from Netscape. In Netscape a window.close() is only capable of closing a window that was opened with window.open() without asking. It has to ask to close windows that were opened either with File->New Navigator Window, or by opening Netscape.
not engine.
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: Javascript Engine → DOM Level 0
Ever confirmed: true
QA Contact: pschwartau → desale
I be this is a dupe.
yep. looks like a duplicate of "close() can close windows it doesn't own" *** This bug has been marked as a duplicate of 32571 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
VERIFIED dup
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.