File tree 1 file changed +6
-4
lines changed
packages/app-frontend/src/features/timeline
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export default defineComponent({
100
100
101
101
function onScroll () {
102
102
const scrollerEl = scroller .value .$el
103
- isAtScrollBottom .value = scrollerEl .scrollTop + scrollerEl .clientHeight >= scrollerEl .scrollHeight - 100
103
+ isAtScrollBottom .value = scrollerEl .scrollTop + scrollerEl .clientHeight >= scrollerEl .scrollHeight - 400
104
104
}
105
105
106
106
watch (scroller , value => {
@@ -151,8 +151,10 @@ export default defineComponent({
151
151
function scrollToBottom () {
152
152
if (! scroller .value ) return
153
153
154
- const scrollerEl = scroller .value .$el
155
- scrollerEl .scrollTop = scrollerEl .scrollHeight
154
+ requestAnimationFrame (() => {
155
+ const scrollerEl = scroller .value .$el
156
+ scrollerEl .scrollTop = scrollerEl .scrollHeight
157
+ })
156
158
}
157
159
158
160
// Important: Watch this after the scroll to inspect event watchers
@@ -241,7 +243,7 @@ export default defineComponent({
241
243
:items =" filteredEvents"
242
244
:item-size =" itemHeight"
243
245
class =" flex-1"
244
- @scroll.native =" onScroll()"
246
+ @scroll.native.passive =" onScroll()"
245
247
>
246
248
<template #default =" { item: event } " >
247
249
<TimelineEventListItem
You can’t perform that action at this time.
0 commit comments