Fixes #861: Properly insert chatroom into DOM

This commit is contained in:
JC Brand 2017-04-28 19:49:36 +02:00
parent e0ea0dfd88
commit 4c23925684

View File

@ -39,10 +39,15 @@
ChatRoomView: { ChatRoomView: {
insertIntoDOM: function () { 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; return this;
} }
} }
} },
}); });
})); }));