Skip to content

Commit

Permalink
Merge pull request #123 from microsoft/Bug11709
Browse files Browse the repository at this point in the history
`fix`: While switching from Browse to Generate section, on Generate section vertical scroll starts to move from top to bottom by default.
  • Loading branch information
Roopan-Microsoft authored Dec 17, 2024
2 parents ae7d2b2 + f062914 commit a0f2d63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/pages/chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -825,11 +825,11 @@ const Chat = ({ type = ChatType.Browse }: Props) => {
}, [AUTH_ENABLED])

useLayoutEffect(() => {
chatMessageStreamEnd.current?.scrollIntoView({ behavior: 'smooth' })
chatMessageStreamEnd.current?.scrollIntoView({ behavior: 'auto' })
}, [showLoadingMessage, processMessages])

useEffect(() => {
chatMessageStreamEnd.current?.scrollIntoView({ behavior: 'smooth' })
chatMessageStreamEnd.current?.scrollIntoView({ behavior: 'auto' })
}, [messages])

const onShowCitation = (citation: Citation) => {
Expand Down

0 comments on commit a0f2d63

Please sign in to comment.