Closed Bug 238457 Opened 20 years ago Closed 20 years ago

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

Categories

(SeaMonkey :: UI Design, defect)

x86
Windows 98
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8alpha4

People

(Reporter: enzo77, Assigned: jag+mozilla)

References

(Blocks 1 open bug, )

Details

(Keywords: fixed-aviary1.0, testcase)

Attachments

(1 file)

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.
Attached file testcase
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
Blocks: popups
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
*** Bug 197895 has been marked as a duplicate of this bug. ***
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?
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.
I can no longer reproduce this with builds from 0917
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
Closed: 20 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.

Attachment

General

Creator:
Created:
Updated:
Size: