Bug Tracker

Ticket #4791 (closed bug: invalid)

Opened 6 years ago

Last modified 4 years ago

$(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:
Blocking: Blocked by:

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>

Change History

comment:1 Changed 6 years ago by brandon

  • Status changed from new to closed
  • Resolution set to duplicate

This was fixed with #4268

comment:2 Changed 6 years ago by kevin

  • Status changed from closed to reopened
  • Resolution duplicate deleted

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

comment:3 Changed 4 years ago by snover

  • Owner changed from brandon to kevin
  • Status changed from reopened to pending

Please provide a test case demonstrating this issue.

comment:4 Changed 4 years ago by trac-o-bot

  • Status changed from pending to closed
  • Resolution set to invalid

Automatically closed due to 14 days of inactivity.

Note: See TracTickets for help on using tickets.