fix: autoscroll function in update dialog doesn't work after switching to overlay scrollbar

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej committed 2021-11-02 23:10:13 +01:00
1 parent eecd24a8d6
commit eb88bc703b
1 file changed
+8 -3
+8 -3
View File
@@ -164,9 +164,14 @@ export default class TheUpdateDialog extends Mixins(BaseMixin) {
@Watch('messages')
messagesChanged() {
this.$nextTick(() => {
if (this.$refs.updaterLogScroll) this.$refs.updaterLogScroll.$el.scrollTop = this.$refs.updaterLogScroll.$el.scrollHeight
})
setTimeout(() => {
this.$nextTick(() => {
if (this.$refs.updaterLogScroll) {
const overlayscroll = this.$refs.updaterLogScroll.osInstance()
overlayscroll?.scroll({ y: '100%' })
}
})
}, 50)
}
}
</script>