Browse Source

Fixes #861: Properly insert chatroom into DOM

JC Brand 8 years ago
parent
commit
4c23925684
1 changed files with 7 additions and 2 deletions
  1. 7 2
      src/converse-muc-embedded.js

+ 7 - 2
src/converse-muc-embedded.js

@@ -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;
                 }
             }
-        }
+        },
+
     });
 }));