Bug Tracker

Opened 7 years ago

Closed 5 years ago

#4791 closed bug (invalid)

$(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>

Change History (4)

comment:1 Changed 7 years ago by brandon

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

This was fixed with #4268

comment:2 Changed 7 years ago by kevin

  • Resolution duplicate deleted
  • Status changed from closed to reopened

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

comment:3 Changed 5 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 5 years ago by trac-o-bot

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

Automatically closed due to 14 days of inactivity.

Note: See TracTickets for help on using tickets.