mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-11-11 21:39:52 +00:00
fix firefox autoscroll (#2519)
This commit is contained in:
parent
182af739c4
commit
332311234a
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])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user