tweak scroll tolerance

This commit is contained in:
Mckay Wrigley 2023-03-23 08:14:37 -06:00
parent 68cd41a6dc
commit 71a770c24e
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ export const Chat: FC<Props> = ({ conversation, models, messageIsStreaming, mode
const handleScroll = () => { const handleScroll = () => {
if (chatContainerRef.current) { if (chatContainerRef.current) {
const { scrollTop, scrollHeight, clientHeight } = chatContainerRef.current; const { scrollTop, scrollHeight, clientHeight } = chatContainerRef.current;
const bottomTolerance = 50; const bottomTolerance = 30;
if (scrollTop + clientHeight < scrollHeight - bottomTolerance) { if (scrollTop + clientHeight < scrollHeight - bottomTolerance) {
setAutoScrollEnabled(false); setAutoScrollEnabled(false);