Skip to main content

Bug Tracker

Side navigation

#792 closed bug (fixed)

Opened January 12, 2007 12:47PM UTC

Closed January 12, 2007 08:35PM UTC

Last modified March 15, 2012 06:59PM UTC

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.

Attachments (0)
Change History (4)

Changed January 12, 2007 01:49PM UTC by joern comment:1

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.

Changed January 12, 2007 03:57PM UTC by Dave comment:2

"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.

Changed January 12, 2007 08:14PM UTC by Renato comment:3

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.

Changed January 12, 2007 08:35PM UTC by john comment:4

resolution: → fixed
status: newclosed