From 5ad1a9c8c7d04dfa8401f4a5e98efbe7c389dd41 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 26 Feb 2025 15:30:30 +0530 Subject: [PATCH] feat: don't scroll to bottom if user has scrolled --- .../dashboard/components/widgets/conversation/MessagesView.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue index d00e162c9..789156a34 100644 --- a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue +++ b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue @@ -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(); } });