pad.js: in switchToPad() remove the first iframe before loading the pad
This is an old bug: after an import there were always two iframes with duplicated content, and the last one was simply on top of the old one. This bug was there since forever, and became evident when the layout was migrated to Flexbox.pull/3941/head
parent
a471dbeebf
commit
c9a9b7ae42
|
@ -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){
|
||||
|
|
Loading…
Reference in New Issue