From 480b499d7b6fab47458ed87fe208a5776b3622f5 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 22 Feb 2018 10:16:33 +0100 Subject: [PATCH] Hack to remove onbeforeunload popup --- www/oocell/doc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/oocell/doc.js b/www/oocell/doc.js index 96276c9ba..fd9dca9ea 100644 --- a/www/oocell/doc.js +++ b/www/oocell/doc.js @@ -30,7 +30,10 @@ config = { "onAppReady": function(evt) { console.log("in onAppReady"); }, } }; -window.onbeforeunload = null; +window.onbeforeunload = function () { + var ifr = document.getElementsByTagName('iframe')[0]; + if (ifr) { ifr.remove(); } +}; var docEditor = new DocsAPI.DocEditor("placeholder", config);