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 {
350350 const element = this .$refs .scrollContainer
351351 if (! element) return
352352
353- const options = { top: element .scrollHeight }
354-
355353 if (oldVal && newVal && oldVal .length === newVal .length - 1 ) {
356354 return setTimeout (() => {
357- options . behavior = ' smooth'
355+ const options = { top : element . scrollHeight , behavior : ' smooth' }
358356 element .scrollTo (options)
359357 }, 50 )
360358 }
@@ -364,7 +362,7 @@ export default {
364362 setTimeout (() => (this .loadingMoreMessages = false ), 0 )
365363 } else if (newVal .length ) {
366364 setTimeout (() => {
367- element .scrollTo (options )
365+ element .scrollTo ({ top : element . scrollHeight } )
368366 this .loadingMessages = false
369367 }, 0 )
370368 }
You can’t perform that action at this time.
0 commit comments