Fix scroll stickiness while hidden
Fix bug: Open thread A, open thread B, receive message in thread A, open thread A. Scroll bar has reset to the top.
This commit is contained in:
parent
e3c56a0c03
commit
9e79ecddf8
1 changed files with 3 additions and 0 deletions
|
@ -32,6 +32,9 @@
|
|||
this.scrollToBottom();
|
||||
},
|
||||
measureScrollPosition: function() {
|
||||
if (this.el.scrollHeight === 0) { // hidden
|
||||
return;
|
||||
}
|
||||
this.scrollPosition = this.$el.scrollTop() + this.$el.outerHeight();
|
||||
this.scrollHeight = this.el.scrollHeight;
|
||||
this.shouldStickToBottom = this.scrollPosition === this.scrollHeight;
|
||||
|
|
Loading…
Reference in a new issue