in a tabbed window, a frame unload handler can use a parent script function to open a popup window

RESOLVED FIXED in mozilla1.8alpha4

Status

SeaMonkey
UI Design
RESOLVED FIXED
14 years ago
12 years ago

People

(Reporter: Enzo A, Assigned: jag (Peter Annema))

Tracking

(Blocks: 1 bug, {fixed-aviary1.0, testcase})

Trunk
mozilla1.8alpha4
x86
Windows 98
fixed-aviary1.0, testcase
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

open http://mrskin.nudesonline.com in a new tab, view then close that new tab.
when closing the tab an undesired popup window appears. the site is somehow able
to evade firefox popup block!

Reproducible: Always
Steps to Reproduce:
1. open tab with options set to block all popups
2. visit http://mrskin.nudesonline.com
3. close tab of http://mrskin.nudesonline.com

Actual Results:  
a popup appears!

Expected Results:  
no popup should appear.

Comment 1

14 years ago
Created attachment 145309 [details]
testcase

Comment 2

14 years ago
Confirmed with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b)
Gecko/20040327 Firefox/0.8.0+

Also happens in a month-old build of Seamonkey.

-> XP Apps
Assignee: firefox → jag
Status: UNCONFIRMED → NEW
Component: General → XP Apps
Ever confirmed: true
Keywords: testcase
Product: Firefox → Browser
QA Contact: pawyskoczka
Summary: when closing tab of this link, the site is able to evade popup blocker → middle-click to close tab counts as popup-allowing click in onunload event
Version: unspecified → Trunk

Updated

14 years ago
Blocks: 176958

Comment 3

14 years ago
The popup is allowed when closing the tab by (almost) any means: middle-click,
context menu, tab close widget. Though Ctrl-F4 on Windows is an exception. Also
note the popup is suppressed if the testcase is adjusted so the function is
called on the frame itself. That is,

onunload=window.open
instead of
onunload=parent.exit

I'm adjusting the summary to reflect this. That's the longest summary I've ever
written in a bug report.

The popup should be caught by the general unload handler suppression. It should
be independent of the method used to close the window(tab). In Jesse's test case
the unload handler of the frame window is calling a function from the frameset
window. At the time this happens, the frameset window doesn't yet realize that
it's about to be unloaded. That's rather unfortunate. Somewhat happily, this
seems to happen only under the restricted circumstances of this bug.
Summary: middle-click to close tab counts as popup-allowing click in onunload event → in a tabbed window, a frame unload handler can use a parent script function to open a popup window

Comment 4

14 years ago
*** Bug 197895 has been marked as a duplicate of this bug. ***

Comment 5

13 years ago
I'm seeing this on Firefox 1.0PR on Win XP.  Mac doesn't seem to be affected.

Requesting blocking-aviary 1.0
Flags: blocking-aviary1.0?

Comment 6

13 years ago
currently testing at www.aol.com

using the [X] close tab button blocks the popup onunload.

using context Close Tab does not block the popup.

Comment 7

13 years ago
I can no longer reproduce this with builds from 0917

Comment 8

13 years ago
Yes this one has been fixed, no doubt by the general rewrite in bug 252326. (The
subsequent adjustment in bug 259117 was probably also applicable.)
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Depends on: 252326
Flags: blocking-aviary1.0?
Keywords: fixed-aviary1.0
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8alpha4
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.