sync accepted #2409 fix from upstream
This commit is contained in:
parent
73b6402cff
commit
57af6dd320
1 changed files with 3 additions and 3 deletions
|
@ -414,9 +414,9 @@
|
|||
|
||||
useEffect(() => {
|
||||
// scroll to bottom (if needed)
|
||||
let scrollable = document.querySelector('#content');
|
||||
if (scrollable && scrollable.scrollHeight <= scrollable.scrollTop + scrollable.offsetHeight + 300) {
|
||||
scrollable.scrollTo(0, scrollable.scrollHeight)
|
||||
const parent = container.current.parentElement;
|
||||
if (parent && parent.scrollHeight <= parent.scrollTop + parent.offsetHeight + 300) {
|
||||
parent.scrollTo(0, parent.scrollHeight)
|
||||
}
|
||||
}, [messages])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue