loleaflet/main.js | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 674ba96da0351f3a216d7974e35358d3a7c0b72e
Author: Henry Castro <[email protected]>
Date: Wed Dec 28 13:44:49 2016 -0400
tdf#103642 Page refresh causes unwanted error message
(cherry picked from commit 9c64db3ad1d60c4de659d779a4fba17a298ed648)
Change-Id: Ia276b00a4a1638cdb878c052886c01a9dc47db58
Reviewed-on: https://gerrit.libreoffice.org/35481
Reviewed-by: Thorsten Behrens <[email protected]>
Tested-by: Thorsten Behrens <[email protected]>
diff --git a/loleaflet/main.js b/loleaflet/main.js
index 93e85115..29399a92 100644
--- a/loleaflet/main.js
+++ b/loleaflet/main.js
@@ -114,4 +114,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');
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits