mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
check is MessagesList is rendered before scrolling
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
This commit is contained in:
parent
996a8ca909
commit
c651f648e3
1 changed files with 10 additions and 2 deletions
|
|
@ -945,7 +945,11 @@ export default {
|
|||
* Scrolls to the bottom of the list smoothly.
|
||||
*/
|
||||
smoothScrollToBottom() {
|
||||
this.$nextTick(function() {
|
||||
this.$nextTick(() => {
|
||||
if (!this.$refs.scroller) {
|
||||
return
|
||||
}
|
||||
|
||||
if (this.isWindowVisible && (document.hasFocus() || this.isInCall)) {
|
||||
// scrollTo is used when the user is watching
|
||||
this.$refs.scroller.scrollTo({
|
||||
|
|
@ -970,7 +974,11 @@ export default {
|
|||
* Scrolls to the bottom of the list.
|
||||
*/
|
||||
scrollToBottom() {
|
||||
this.$nextTick(function() {
|
||||
this.$nextTick(() => {
|
||||
if (!this.$refs.scroller) {
|
||||
return
|
||||
}
|
||||
|
||||
this.$refs.scroller.scrollTop = this.$refs.scroller.scrollHeight
|
||||
this.setChatScrolledToBottom(true)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue