fix autoscroll not working in certain cases
This commit is contained in:
parent
884fec6c5f
commit
cdb4e02413
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
const onScroll = (e) => {
|
const onScroll = (e) => {
|
||||||
const { scrollTop, offsetHeight, scrollHeight } = e.target;
|
const { scrollTop, offsetHeight, scrollHeight } = e.target;
|
||||||
if ((scrollTop + offsetHeight) >= scrollHeight) { // user scrolled to bottom
|
if ((scrollTop + offsetHeight) >= (scrollHeight - 10)) { // user scrolled to bottom
|
||||||
messages.setIsCollectingOldMessages(true);
|
messages.setIsCollectingOldMessages(true);
|
||||||
shouldAutoscroll = true;
|
shouldAutoscroll = true;
|
||||||
isScrolledToBottom = true;
|
isScrolledToBottom = true;
|
||||||
|
|
Loading…
Reference in a new issue