Skip to content

Commit 3cc160a

Browse files
committed
fix: stabilize virtual scroll e2e diagnostics
1 parent ed5e19f commit 3cc160a

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

playground/src/pages/virtual-scroll.vue

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -977,15 +977,8 @@ function onHeightChange(message: Message, metrics: MarkstreamVirtualMetrics) {
977977
if (previous == null || Math.abs(previous - nextHeight) > 1) {
978978
setItemHeight(key, nextHeight)
979979
980-
if (isActiveThreadMessage && shouldRestoreOuterAnchorAfterHeightChange(outerAnchor)) {
981-
void restoreOuterAnchor(outerAnchor, {
982-
immediate: true,
983-
expectedJump: outerAnchor?.type === 'bottom'
984-
|| streamTimer != null
985-
|| isStreamingHeightChangeExpected()
986-
|| threadRestoreTargets.has(activeThreadId.value),
987-
})
988-
}
980+
if (isActiveThreadMessage && shouldRestoreOuterAnchorAfterHeightChange(outerAnchor))
981+
void restoreOuterAnchor(outerAnchor, { immediate: true })
989982
}
990983
991984
if (isActiveThreadMessage && !isForceHidden(message)) {

0 commit comments

Comments
 (0)