File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -350,11 +350,9 @@ export default {
350
350
const element = this .$refs .scrollContainer
351
351
if (! element) return
352
352
353
- const options = { top: element .scrollHeight }
354
-
355
353
if (oldVal && newVal && oldVal .length === newVal .length - 1 ) {
356
354
return setTimeout (() => {
357
- options . behavior = ' smooth'
355
+ const options = { top : element . scrollHeight , behavior : ' smooth' }
358
356
element .scrollTo (options)
359
357
}, 50 )
360
358
}
@@ -364,7 +362,7 @@ export default {
364
362
setTimeout (() => (this .loadingMoreMessages = false ), 0 )
365
363
} else if (newVal .length ) {
366
364
setTimeout (() => {
367
- element .scrollTo (options )
365
+ element .scrollTo ({ top : element . scrollHeight } )
368
366
this .loadingMessages = false
369
367
}, 0 )
370
368
}
You can’t perform that action at this time.
0 commit comments