Skip to content

prevent autoscrolling when replying to a prompt#129

Open
SusanGithaigaN wants to merge 1 commit intobitcoinsearch:mainfrom
SusanGithaigaN:prevent-scroll-to-bottom
Open

prevent autoscrolling when replying to a prompt#129
SusanGithaigaN wants to merge 1 commit intobitcoinsearch:mainfrom
SusanGithaigaN:prevent-scroll-to-bottom

Conversation

@SusanGithaigaN
Copy link
Copy Markdown

This PR fixes #93 by preventing the chat from scrolling to the bottom of sources on every reply.

Solution

  • Removed all useEffect hooks that triggered scroll when generating a response
  • Added a single useEffect that scrolls only when a new user prompt is submitted,
    bringing the question into view
  • Scroll is skipped entirely if the user has manually scrolled up (userHijackedScroll)

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat-btc Ready Ready Preview, Comment Mar 26, 2026 1:46pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent from scrolling all the way down to the bottom of the sources every time replying to a prompt

1 participant