Bug Tracker

Ticket #792 (closed bug: fixed)

Opened 2 years ago

Last modified 1 year ago

Unable to bind unload event of the window

Reported by: Renato Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.1 Component: event
Version: 1.1a Keywords:
Cc: Needs:

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

Change History

Changed 2 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.

Changed 2 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.

Changed 2 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.

Changed 2 years ago by john

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.