diff --git a/internal/service/static/main.js b/internal/service/static/main.js index db48368..40630af 100644 --- a/internal/service/static/main.js +++ b/internal/service/static/main.js @@ -2218,7 +2218,7 @@ class Odidere { this.#handleDeleteClick(e, message.id), ); - this.$chat.appendChild($msg); + this.$chat.insertBefore($msg, this.$chatLoading); this.#scrollToBottom(); } @@ -2250,7 +2250,7 @@ class Odidere { $msg.querySelector('[data-action="copy"]').remove(); $msg.querySelector('[data-action="delete"]').remove(); - this.$chat.appendChild($msg); + this.$chat.insertBefore($msg, this.$chatLoading); this.#scrollToBottom(); return $msg; } @@ -2465,7 +2465,7 @@ class Odidere { this.#handleDeleteClick(e, message.id), ); - this.$chat.appendChild($msg); + this.$chat.insertBefore($msg, this.$chatLoading); this.#scrollToBottom(); } @@ -2478,7 +2478,7 @@ class Odidere { this.$tplErrorMessage.content.cloneNode(true).firstElementChild; $msg.querySelector('.message__content').textContent = message; - this.$chat.appendChild($msg); + this.$chat.insertBefore($msg, this.$chatLoading); this.#scrollToBottom(); }