user a different method of detecting scroll, hopefully fixing ios webkit scroll
This commit is contained in:
parent
476a36b79a
commit
81e9de6cd8
1 changed files with 2 additions and 2 deletions
|
@ -25,8 +25,8 @@
|
|||
});
|
||||
|
||||
const onScroll = (e) => {
|
||||
const { scrollTop, offsetHeight, scrollHeight } = e.target;
|
||||
if ((scrollTop + offsetHeight) >= (scrollHeight - 10)) { // user scrolled to bottom
|
||||
const { scrollHeight, scrollTop, clientHeight } = e.target;
|
||||
if ((scrollHeight - scrollTop - clientHeight) <= 20) { // user scrolled to bottom
|
||||
messages.setIsCollectingOldMessages(true);
|
||||
shouldAutoscroll = true;
|
||||
isScrolledToBottom = true;
|
||||
|
|
Loading…
Reference in a new issue