Skip to content

Commit

Permalink
Use beforeUnload instead of unload because Firefox doesn't call unload
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarcand committed Jul 25, 2012
1 parent f8445a0 commit aa5a6ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/jquery/src/main/webapp/jquery/jquery.atmosphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* Official documentation of this library: https://github.com/Atmosphere/atmosphere/wiki/jQuery.atmosphere.js-API
*/
jQuery.atmosphere = function() {
jQuery(window).unload(function() {
jQuery(window).bind("beforeunload", function() {
jQuery.atmosphere.unsubscribe();
});

Expand Down

0 comments on commit aa5a6ee

Please sign in to comment.