code.onehippo.org is currently readonly. We are migrating to code.bloomreach.com, please continue working there on Monday 14/12. See: https://docs.bloomreach.com/display/engineering/GitLab

Commit e57bd63d authored by Mathijs den Burger's avatar Mathijs den Burger

CMS7-8404: use 'beforeunload' instead of 'unload' event to close websocket...

CMS7-8404: use 'beforeunload' instead of 'unload' event to close websocket connection before page reload
parent 0e055443
......@@ -90,7 +90,7 @@
if (window.addEventListener && window.WebSocket) {
window.addEventListener("load", connect);
window.addEventListener("unload", disconnect);
window.addEventListener("beforeunload", disconnect);
} else if (console.log) {
console.log("Hippo auto-reload is not available because this browser does not support WebSockets")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment