Merge pull request #415 from RugerMcCarthy/opt/back_to_autoscroll

opt: back to autoscroll when hit bottom
This commit is contained in:
Yifei Zhang 2023-04-03 17:57:40 +08:00 committed by GitHub
commit a4743034a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);