Prevent live chat from scrolling when user scolls up to view messages

This commit is contained in:
Preston 2020-12-17 14:11:13 -05:00
parent ea03dee245
commit b9f4cd7a38
1 changed files with 2 additions and 1 deletions

View File

@ -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)
}
},