[Libreoffice-commits] online.git: loleaflet/main.js

Henry Castro hcastro at collabora.com
Wed Dec 28 17:44:49 UTC 2016


 loleaflet/main.js |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 9c64db3ad1d60c4de659d779a4fba17a298ed648
Author: Henry Castro <hcastro at collabora.com>
Date:   Wed Dec 28 13:44:49 2016 -0400

    tdf#103642 Page refresh causes unwanted error message

diff --git a/loleaflet/main.js b/loleaflet/main.js
index ac359b5..c73e281 100644
--- a/loleaflet/main.js
+++ b/loleaflet/main.js
@@ -121,4 +121,9 @@ map.addControl(L.control.rowHeader());
 map.addControl(L.control.contextMenu());
 map.addControl(L.control.menubar());
 
+window.addEventListener('beforeunload', function () {
+	if (global.map && global.map._socket) {
+		global.map._socket.close();
+	}
+});
 //require('./dist/toolbar/toolbar');


More information about the Libreoffice-commits mailing list