We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7167bc4 commit 8d98fcaCopy full SHA for 8d98fca
src/ChatWindow/Room.vue
@@ -308,7 +308,7 @@ export default {
308
const options = { top: element.scrollHeight }
309
310
if (oldVal && newVal && oldVal.length === newVal.length - 1) {
311
- setTimeout(() => {
+ return setTimeout(() => {
312
options.behavior = 'smooth'
313
element.scrollTo(options)
314
}, 50)
@@ -317,8 +317,10 @@ export default {
317
if (this.infiniteState) {
318
this.infiniteState.loaded()
319
} else if (newVal.length) {
320
- this.loadingMessages = false
321
- setTimeout(() => element.scrollTo(options), 50)
+ setTimeout(() => {
+ element.scrollTo(options)
322
+ this.loadingMessages = false
323
+ }, 0)
324
}
325
},
326
messagesLoaded(val) {
0 commit comments