-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed autoscroll on hovering messaged + update messages #638
base: main
Are you sure you want to change the base?
Conversation
@michaelwlt is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
i tried this but now it doesn't auto-scroll if there's a new message |
@gianpaj Not sure, why it is not working on your end. My instance here: https://codeberg.org/michaelwlt/bettergptv2 works without any problem. |
I have other code changes. But not in the The issue is that it now scrolls only if you're at the bottom of the list of messages. beforebefore-scroll-opt.mp4afterafter-scroll-opt.mp4I'm not sure how to debug the I'm not sure if this is the correct fix, but I tried removing this line, and it seems to fix the original issue and keep the scrolling working for new messages observer.observe(container, {
childList: true,
- subtree: true,
+ // subtree: true,
attributes: true,
characterData: true,
}); |
Remove
This way it scrolls to the bottom if a new message is added but won't force you back down as soon as you start scrolling up. |
We should wait for a maintainer to weigh in on this, but I think the PR should fix the issue in the current version of the web app. And the less code, the better |
The previous implementation of the autoscroll was too broad, essentially moving the view too often.
This PR fixes #597