Fix bug where new chat messages would not append

... due to incorrect class and id assignment of the chat modal. Regression was caused by an earlier commit that moved the
typing span elsewhere.
This commit is contained in:
Julian Lam
2015-07-29 12:58:06 -04:00
parent 81dc2b9615
commit 2593f1b4d9
3 changed files with 14 additions and 10 deletions

View File

@@ -125,8 +125,9 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
};
function onMessagesParsed(html) {
var newMessage = $(html);
newMessage.insertBefore($('.user-typing'));
var newMessage = $(html),
chatContainer = $('.chat-content');
newMessage.appendTo(chatContainer);
newMessage.find('.timeago').timeago();
newMessage.find('img:not(".chat-user-image")').addClass('img-responsive');
Chats.scrollToBottom($('.expanded-chat .chat-content'));