Commit 82b7e284 authored by JC Brand's avatar JC Brand

Use outerHTML to render existing nickname form

parent 60134c4d
...@@ -1723,9 +1723,15 @@ converse.plugins.add('converse-muc-views', { ...@@ -1723,9 +1723,15 @@ converse.plugins.add('converse-muc-views', {
container.innerHTML = html; container.innerHTML = html;
u.addClass('muc-bottom-panel--nickname', container); u.addClass('muc-bottom-panel--nickname', container);
} else { } else {
this.hideChatRoomContents(); const form = this.el.querySelector('.muc-nickname-form');
const container = this.el.querySelector('.chatroom-body'); if (form) {
container.insertAdjacentHTML('beforeend', html); sizzle('.spinner', this.el).forEach(u.removeElement);
form.outerHTML = html;
} else {
this.hideChatRoomContents();
const container = this.el.querySelector('.chatroom-body');
container.insertAdjacentHTML('beforeend', html);
}
} }
u.safeSave(this.model.session, {'connection_status': converse.ROOMSTATUS.NICKNAME_REQUIRED}); u.safeSave(this.model.session, {'connection_status': converse.ROOMSTATUS.NICKNAME_REQUIRED});
}, },
......
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