From b9f4cd7a382fa98ea3479b83ec6d5148197c7591 Mon Sep 17 00:00:00 2001 From: Preston Date: Thu, 17 Dec 2020 14:11:13 -0500 Subject: [PATCH] Prevent live chat from scrolling when user scolls up to view messages --- .../components/watch-video-live-chat/watch-video-live-chat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js b/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js index 9d8be663..d8f122aa 100644 --- a/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js +++ b/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js @@ -213,7 +213,8 @@ export default Vue.extend({ liveChatComments.animate({ scrollTop: liveChatComments.prop('scrollHeight') }) } - if (this.comments.length > 150) { + if (this.comments.length > 150 && this.stayAtBottom) { + console.log('user is not at bottom') this.comments = this.comments.splice(this.comments.length - 150, this.comments.length) } },