Correctly calculate scroll when loading more history
This commit is contained in:
parent
08fbcd4958
commit
72a534f42b
@ -12,7 +12,7 @@ socket.on("more", function(data) {
|
|||||||
|
|
||||||
// get the scrollable wrapper around messages
|
// get the scrollable wrapper around messages
|
||||||
const scrollable = chan.closest(".chat");
|
const scrollable = chan.closest(".chat");
|
||||||
const heightOld = chan.height();
|
const heightOld = chan.height() - scrollable.scrollTop();
|
||||||
|
|
||||||
// If there are no more messages to show, just hide the button and do nothing else
|
// If there are no more messages to show, just hide the button and do nothing else
|
||||||
if (!data.messages.length) {
|
if (!data.messages.length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user