Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 8 years ago

#792 closed bug (fixed)

Unable to bind unload event of the window

Reported by: Renato Owned by:
Priority: major Milestone: 1.1
Component: event Version: 1.1a
Keywords: Cc:
Blocked by: Blocking:

Description

When you try to bind the unload event of the window writing

jQuery(window).unload(function(){alert("unload")})

jQuery(window) returns an empty jQuery object, not binding the function to the event.

Change History (4)

comment:1 Changed 13 years ago by joern

jQuery itselfs registers for the window unload event to remove all event handlers, due to memory leaks. I guess the other registered unload events are removed, too.

comment:2 Changed 13 years ago by Dave

"jQuery(window) returns an empty jQuery object"

This isn't happening on build 1014 IE/Firefox so I assume it's either fixed or needs a more detailed repro example.

comment:3 Changed 13 years ago by Renato

Well, there no bug in standard conditions, sorry.

We used the library with a different name, to allow multiple versions of jQuery, replacing "jQuery" with another word but not in case sensitive mode

So the jquery property and the jQuery object were replaced both with the same name, causing the error, as window was managed as a jQuery object.

comment:4 Changed 13 years ago by john

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.