Commit 032fe0d4 authored by JC Brand's avatar JC Brand

always scroll down when user sends a message

parent 62f0aacf
......@@ -329,9 +329,17 @@
handleTextMessage: function (message) {
this.showMessage(_.clone(message.attributes));
if ((message.get('sender') !== 'me') && (converse.windowState === 'blur') || this.model.get('scrolled', true)) {
if (message.get('sender') !== 'me') {
if (converse.windowState === 'blur' || this.model.get('scrolled', true)) {
converse.incrementMsgCounter();
}
} else {
// We remove the "scrolled" flag so that the chat area
// gets scrolled down. We always want to scroll down
// when the user writes a message as opposed to when a
// message is received.
this.model.set('scrolled', false);
}
if (this.shouldShowOnTextMessage()) {
this.show();
}
......
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