]> git.babelmonkeys.de Git - adhocweb.git/commitdiff
Fix disconnection on leaving the page
authorFlorian Zeitz <florob@babelmonkeys.de>
Wed, 1 Dec 2010 19:34:13 +0000 (20:34 +0100)
committerFlorian Zeitz <florob@babelmonkeys.de>
Wed, 1 Dec 2010 19:34:13 +0000 (20:34 +0100)
js/main.js

index 9e09865c1e5200aa38e21690a77b948444cb0f9c..188dfc762eda4af93e1ac45659c9671bf8046d5f 100644 (file)
@@ -339,9 +339,8 @@ $(document).ready(function () {
     });
 });
 
-onunload = function() {
+window.onunload = window.onbeforeunload = function() {
     if (connection) {
         connection.disconnect();
     }
 }
-