mirror of
https://github.com/nextcloud/spreed.git
synced 2025-07-21 10:37:10 +00:00
Merge pull request #10039 from nextcloud/fix/noid/check-ref-before-scroll
fix(MessagesList) - check if list is rendered before scrolling
This commit is contained in:
@ -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)
|
||||
})
|
||||
|
Reference in New Issue
Block a user