Commit 4c239256 authored by JC Brand's avatar JC Brand

Fixes #861: Properly insert chatroom into DOM

parent e0ea0dfd
......@@ -39,10 +39,15 @@
ChatRoomView: {
insertIntoDOM: function () {
converse.env.jQuery('#converse-embedded-chat').html(this.$el);
if (!document.body.contains(this.el)) {
var container = document.querySelector('#converse-embedded-chat');
container.innerHTML = '';
container.appendChild(this.el);
}
return this;
}
}
}
},
});
}));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment