Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#5538 closed bug (worksforme)

jQuery unload method not working Cross browser

Reported by: valugi Owned by:
Priority: minor Milestone: 1.4
Component: event Version: 1.3.2
Keywords: unload Cc:
Blocked by: Blocking:


I have this simplified code:


$(window).unload(function (){




The jQuery method should work in all jQuery supported browsers. The alert works in Safari, Chrome, FF on Windows The alert is not poping on working in Mac FF, Opera, IE8.

The alert should pop up before closing the window. I also put an example online. http://pastebin.me/b48ec58f7340cd1baf8f144ef152af57

Change History (3)

comment:1 Changed 13 years ago by dmethvin

Component: unfiledevent
Resolution: worksforme
Status: newclosed

This works for me with jQuery 1.4 in IE8. The unload event doesn't fire on the back button, but this is true even if you assign to window.onunload so it's not a jQuery issue.

comment:2 Changed 11 years ago by dynamodan

This is broken again. It is not working in Google Chrome 17.0.963.46. It works in IE8 and FF 9.01. I haven't tested any others.

comment:3 Changed 11 years ago by dmethvin

The variable would seem to be Chrome's new version then, please report it to them (with a test case of course) and it'll be fixed in 6 weeks or less.

Note: See TracTickets for help on using tickets.