Closed Bug 259117 Opened 20 years ago Closed 20 years ago

Popup blocker for onunload does not work when closing a window/tab.

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: betheking, Assigned: jst)

References

(Blocks 1 open bug, )

Details

(Keywords: fixed-aviary1.0, fixed1.7.5)

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10 The popup blocker for onunload events works when leaving a page (by using e.g. the back button), but not when closing a tab. I've seen the problem on several sites now, including the "Come & Go Test" at http://www.popuptest.com/ Reproducible: Always Steps to Reproduce: 1. Go to http://www.popuptest.com/ 2. Open the link "Come & Go Test" in a new tab (or window, I guess). 3. Go to the new tab (if needed) and close it. Actual Results: A popup window is opened. Expected Results: No popup window should open. This problem does not exist in the nightly build from 2004-09-07. I've seen it in the nightly build from 2004-09-13, and in a couple of custom builds made a couple of days before that build. I suspect this regression is a result of the checkin for bug 258499. In bug 253831 there are a couple of recent entries regarding onunload events; they might very well be related to this bug.
I have noticed this bug at http://my.finance.lycos.com/ as well. I worked the problem down to the following: <body onUnLoad="window.open('<http://www.google.com>')"> As mentioned, the popup is not blocked when a tab is closed. This bug may be related to bug 251944. Try the simplified test case there to see this bug in action. IMO, this is a hole in the popup blocking features of Firefox and will be exploited.
This is likely a regression from Bug 252326, as it was checked in after the 2004-09-07 builds were created. It is definitely not a regression from Bug 258499.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-aviary1.0?
Depends on: 252326
Since pop-up blocking is one of the major features used to promote Fx over IE a regression isn't good to ship with IMHO, so nominating 1.0PR?
Flags: blocking-aviary1.0PR?
Over to jst.
Assignee: firefox → jst
Attachment #158829 - Flags: superreview?(brendan)
Attachment #158829 - Flags: review?(bzbarsky)
Comment on attachment 158829 [details] [diff] [review] Always block popups when closing windows (even if closed while processing user input etc). r=bzbarsky.
Attachment #158829 - Flags: review?(bzbarsky) → review+
This is the smallest example that exhibits the problem on: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040911 Firefox/0.10
Comment on attachment 158829 [details] [diff] [review] Always block popups when closing windows (even if closed while processing user input etc). sr=brendan@mozilla.org. /be
Attachment #158829 - Flags: superreview?(brendan) → superreview+
Attached patch Trunk patchSplinter Review
Attachment #158829 - Flags: approval-aviary?
Fixed on the trunk.
Status: NEW → RESOLVED
Closed: 20 years ago
Component: General → DOM
Product: Firefox → Browser
Resolution: --- → FIXED
Version: unspecified → Trunk
Attachment #158829 - Flags: approval1.7.x?
Comment on attachment 158829 [details] [diff] [review] Always block popups when closing windows (even if closed while processing user input etc). a=asa for checkin to the branches.
Attachment #158829 - Flags: approval1.7.x?
Attachment #158829 - Flags: approval1.7.x+
Attachment #158829 - Flags: approval-aviary?
Attachment #158829 - Flags: approval-aviary+
Keywords: fixed-aviary1.0
Flags: blocking-aviary1.0PR?
*** Bug 260366 has been marked as a duplicate of this bug. ***
*** Bug 260888 has been marked as a duplicate of this bug. ***
*** Bug 261000 has been marked as a duplicate of this bug. ***
*** Bug 260936 has been marked as a duplicate of this bug. ***
*** Bug 260025 has been marked as a duplicate of this bug. ***
*** Bug 260825 has been marked as a duplicate of this bug. ***
Summary: Popup blocker for onunload does not work when closing a page. → Popup blocker for onunload does not work when closing a window/tab.
Fixed on the 1.7 branch.
Keywords: fixed1.7.x
Flags: blocking-aviary1.0?
Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040930 Firefox/0.10.1 Is the above version the latest in the 1.7 branch? If so then this bug still exists. I do not know what branch is what and the person who claimed it is fixed in branch 1.7 did not leave any clues as to which file to download to test the bug against. Therefore I will leave the bug as it is but can someone please be more specific about which software this bug is meant to have disapperead from.
*** Bug 261876 has been marked as a duplicate of this bug. ***
This is *not* fixed in 1.7.3, but it is fixed in later nightly 1.7 builds, try downloading one from http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/2004-10-01-07-1.7/
Richard James wrote in Comment #19: > the person who claimed it is fixed in branch 1.7 did not leave any clues > as to which file to download to test the bug against. To test this bug with the "Testcase" included in the attachments for this bug, load the attachment marked "Testcase" into a new tab. Then close the tab. If a popup with google shows up after you close the tab, the bug is not fixed. (I've only tested this with Firefox so I hope it also demonstrates this problem in Mozilla.)
(In reply to comment #22) > Richard James wrote in Comment #19: > > the person who claimed it is fixed in branch 1.7 did not leave any clues > > as to which file to download to test the bug against. > > To test this bug with the "Testcase" included in the attachments for this bug, > load the attachment marked "Testcase" into a new tab. Then close the tab. If a > popup with google shows up after you close the tab, the bug is not fixed. (I've > only tested this with Firefox so I hope it also demonstrates this problem in > Mozilla.) To clarify my problem. I meant where on the ftp site can I download the version of Firefox (Not Mozilla) in which this bug has been removed, so that I can test it?
*** Bug 262957 has been marked as a duplicate of this bug. ***
*** Bug 262980 has been marked as a duplicate of this bug. ***
Blocks: 209134
*** Bug 264078 has been marked as a duplicate of this bug. ***
*** Bug 265699 has been marked as a duplicate of this bug. ***
*** Bug 267275 has been marked as a duplicate of this bug. ***
Status: RESOLVED → VERIFIED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: