Skip to main content

Bug Tracker

Side navigation

#4791 closed bug (invalid)

Opened June 19, 2009 06:19PM UTC

Closed December 02, 2010 08:07AM UTC

$(childWindow).unload registers an unload handler for the owner window

Reported by: kevin Owned by: kevin
Priority: major Milestone: 1.4
Component: event Version: 1.3.2
Keywords: unload Cc:
Blocked by: Blocking:
Description

Registering an unload handler on a child window doesn't work.

The handler instead is attached to the parent window.

<!doctype html>
<html>
    <head>
        <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.js"></script>
        <script>
            function onclick() {
                var childWindow = window.open('about:blank');
                $(childWindow).unload(function() {alert('child window closed');});
            }

        </script>
    </head>
    <body>
        <a href="javascript:onclick();">click</a>
    </body>
</html>
Attachments (0)
Change History (4)

Changed June 19, 2009 06:48PM UTC by brandon comment:1

resolution: → duplicate
status: newclosed

This was fixed with #4268

Changed June 19, 2009 07:41PM UTC by kevin comment:2

resolution: duplicate
status: closedreopened

Reopening this--I can confirm that the fix in #4628 does not fix this issue.

Changed November 11, 2010 10:53PM UTC by snover comment:3

owner: brandonkevin
status: reopenedpending

Please provide a test case demonstrating this issue.

Changed December 02, 2010 08:07AM UTC by trac-o-bot comment:4

resolution: → invalid
status: pendingclosed

Automatically closed due to 14 days of inactivity.