diff --git a/file/js/be.bastelstu.WCF.Chat.coffee b/file/js/be.bastelstu.WCF.Chat.coffee index 9c5f712..13c2b99 100644 --- a/file/js/be.bastelstu.WCF.Chat.coffee +++ b/file/js/be.bastelstu.WCF.Chat.coffee @@ -107,7 +107,7 @@ window.console ?= , @ # Unload the chat - window.onbeforeunload = $.proxy () -> + $(window).on 'beforeunload', $.proxy () -> @unload() return undefined , @