[Libreoffice-commits] online.git: Branch 'libreoffice-5-3' - loleaflet/main.js

Henry Castro hcastro at collabora.com
Mon Mar 27 01:23:26 UTC 2017


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

New commits:
commit 674ba96da0351f3a216d7974e35358d3a7c0b72e
Author: Henry Castro <hcastro at collabora.com>
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 <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

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');


More information about the Libreoffice-commits mailing list