-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Description
I don't know if that's a firefox issue, or simply nobody noticed that so far, but the chat element has a js code to autoscroll but it's not working because it scrolls the wrong element.
Here is a quick fix, in the index.html, in the body of useEffect:
Old code:
if (container.current && container.current.scrollHeight <= container.current.scrollTop + container.current.offsetHeight + 300) {
container.current.scrollTo(0, container.current.scrollHeight)
}
Working code:
if (container.current.parentElement && container.current.parentElement.scrollHeight <= container.current.parentElement.scrollTop + container.current.parentElement.offsetHeight + 300) {
container.current.parentElement.scrollTo(0, container.current.parentElement.scrollHeight)
}
Metadata
Metadata
Assignees
Labels
No labels