Skip to content
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

Scroll to end of chat on submit #3189

Merged
merged 1 commit into from
May 19, 2023
Merged

Scroll to end of chat on submit #3189

merged 1 commit into from
May 19, 2023

Conversation

someone13574
Copy link
Contributor

closes #3105

@github-actions
Copy link

pre-commit failed.
Please run pre-commit run --all-files locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md

useEffect(() => {
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
enableAutoScroll.current = true;
}, [messages]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this happen on submit? or does it run always?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should call messagesEndRef.current?.scrollIntoView({ behavior: "smooth" }); when ever send a new prompt instead.

Copy link
Collaborator

@notmd notmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@notmd notmd merged commit a28a484 into LAION-AI:main May 19, 2023
@someone13574 someone13574 deleted the scroll-on-submit branch May 19, 2023 12:23
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.

Chat page: Scroll to end on submit
3 participants