feat: don't scroll to bottom if user has scrolled

This commit is contained in:
Shivam Mishra
2025-02-26 15:30:30 +05:30
parent 594612e278
commit 5ad1a9c8c7
@@ -359,6 +359,9 @@ export default {
messageElement.scrollIntoView({ behavior: 'smooth' });
this.fetchPreviousMessages();
} else {
// In case the user has already scrolled to a point in the message, we should
// not scroll to the bottom if the user has already scrolled.
if (this.hasUserScrolled) return;
this.scrollToBottom();
}
});