#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: |
Description
I have this simplified code:
$(document).ready(function(){
$(window).unload(function (){
alert('disconnect');
});
});
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
Component: | unfiled → event |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
comment:2 Changed 11 years ago by
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
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.
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.