mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-08-18 05:56:00 -04:00
fix firefox autoscroll (#2519)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -282,8 +282,9 @@
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// scroll to bottom (if needed)
|
// scroll to bottom (if needed)
|
||||||
if (container.current && container.current.scrollHeight <= container.current.scrollTop + container.current.offsetHeight + 300) {
|
const parent = container.current.parentElement;
|
||||||
container.current.scrollTo(0, container.current.scrollHeight)
|
if (parent && parent.scrollHeight <= parent.scrollTop + parent.offsetHeight + 300) {
|
||||||
|
parent.scrollTo(0, parent.scrollHeight)
|
||||||
}
|
}
|
||||||
}, [messages])
|
}, [messages])
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user