Commit 061142e0 authored by JC Brand's avatar JC Brand

Bugfix. Don't scroll down if the user had manually scrolled up

parent 1062fbdd
......@@ -243,7 +243,6 @@ converse.plugins.add('converse-chatview', {
const result = tpl_chatbox(
Object.assign(
this.model.toJSON(), {
'unread_msgs': __('You have unread messages'),
'markScrolled': () => this.markScrolled()
}
)
......@@ -1137,8 +1136,8 @@ converse.plugins.add('converse-chatview', {
_markScrolled: function () {
let scrolled = true;
const is_at_bottom =
(this.content.scrollTop + this.content.clientHeight) >=
this.content.scrollHeight - 62; // sigh...
(this.msgs_container.scrollTop + this.msgs_container.clientHeight) >=
this.msgs_container.scrollHeight - 62; // sigh...
if (is_at_bottom) {
scrolled = false;
......
......@@ -512,8 +512,9 @@ converse.plugins.add('converse-muc-views', {
async render () {
this.el.setAttribute('id', this.model.get('box_id'));
render(tpl_chatroom({
'markScrolled': () => this.markScrolled(),
'muc_show_logs_before_join': api.settings.get('muc_show_logs_before_join'),
'show_send_button': _converse.show_send_button
'show_send_button': _converse.show_send_button,
}), this.el);
this.notifications = this.el.querySelector('.chat-content__notifications');
......
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