Bugfix. Properly insert error messages and spinner

now that messages appear in reverse order due to flexbox
This commit is contained in:
JC Brand 2019-06-18 12:35:56 +02:00
parent 1879c18cd2
commit 6a419cc145

View File

@ -570,7 +570,7 @@ converse.plugins.add('converse-chatview', {
showErrorMessage (message) { showErrorMessage (message) {
this.content.insertAdjacentHTML( this.content.insertAdjacentHTML(
'beforeend', 'afterBegin',
tpl_error_message({'message': message, 'isodate': (new Date()).toISOString() }) tpl_error_message({'message': message, 'isodate': (new Date()).toISOString() })
); );
}, },
@ -578,9 +578,9 @@ converse.plugins.add('converse-chatview', {
addSpinner (append=false) { addSpinner (append=false) {
if (_.isNull(this.el.querySelector('.spinner'))) { if (_.isNull(this.el.querySelector('.spinner'))) {
if (append) { if (append) {
this.content.insertAdjacentHTML('beforeend', tpl_spinner()); this.content.insertAdjacentHTML('afterBegin', tpl_spinner());
} else { } else {
this.content.insertAdjacentHTML('afterbegin', tpl_spinner()); this.content.insertAdjacentHTML('beforeEnd', tpl_spinner());
} }
} }
}, },