Prevent live chat from scrolling when user scolls up to view messages
This commit is contained in:
parent
ea03dee245
commit
b9f4cd7a38
|
@ -213,7 +213,8 @@ export default Vue.extend({
|
||||||
liveChatComments.animate({ scrollTop: liveChatComments.prop('scrollHeight') })
|
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)
|
this.comments = this.comments.splice(this.comments.length - 150, this.comments.length)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue