diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 1ba6f52ad..622b57f3e 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -422,6 +422,11 @@ var pad = { }, switchToPad: function(padId) { + // destroy old pad from DOM + // See https://github.com/ether/etherpad-lite/pull/3915 + // TODO: Check if Destroying is enough and doesn't leave negative stuff + // See ace.js "editor.destroy" for a reference of how it was done before + $('#editorcontainer').find("iframe")[0].remove(); var options = document.location.href.split('?')[1]; var newHref = padId; if (typeof options != "undefined" && options != null){