From c2a79e8a11159eba74de0c4295f93eaa462a61c9 Mon Sep 17 00:00:00 2001 From: RugerMc <550279039@qq.com> Date: Mon, 3 Apr 2023 17:48:22 +0800 Subject: [PATCH] opt: back to auto scroll --- app/components/chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 2bd80aa8..7aa8bfec 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -528,7 +528,7 @@ export function Chat(props: { className={styles["chat-body"]} ref={scrollRef} onScroll={(e) => onChatBodyScroll(e.currentTarget)} - onWheel={() => setAutoScroll(false)} + onWheel={(e) => setAutoScroll(hitBottom && e.deltaY > 0)} onTouchStart={() => { inputRef.current?.blur(); setAutoScroll(false);