opt: back to auto scroll

This commit is contained in:
RugerMc 2023-04-03 17:48:22 +08:00
parent ec88785b6d
commit c2a79e8a11

View File

@ -528,7 +528,7 @@ export function Chat(props: {
className={styles["chat-body"]} className={styles["chat-body"]}
ref={scrollRef} ref={scrollRef}
onScroll={(e) => onChatBodyScroll(e.currentTarget)} onScroll={(e) => onChatBodyScroll(e.currentTarget)}
onWheel={() => setAutoScroll(false)} onWheel={(e) => setAutoScroll(hitBottom && e.deltaY > 0)}
onTouchStart={() => { onTouchStart={() => {
inputRef.current?.blur(); inputRef.current?.blur();
setAutoScroll(false); setAutoScroll(false);