forked from XiaoMo/ChatGPT-Next-Web
Merge pull request #415 from RugerMcCarthy/opt/back_to_autoscroll
opt: back to autoscroll when hit bottom
This commit is contained in:
commit
a4743034a9
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user