Fix stuttering list view

This commit is contained in:
2026-06-15 19:53:18 +02:00
parent 8e57e2f02a
commit a37d845875
2 changed files with 11 additions and 2 deletions
+10 -1
View File
@@ -221,7 +221,16 @@ async function handleIntersection(entries, topbarHeight = 0) {
const readIds = new Set(readFeeds.map(feed => feed.id))
feeds.value = feeds.value.filter(feed => !readIds.has(feed.id))
document.getElementById(0)?.scrollIntoView()
// Removing .observe nodes that have already scrolled above the viewport
// shrinks the document above the current scroll position — native CSS
// scroll anchoring (on by default, no overflow-anchor override here)
// compensates for that automatically by keeping the visually-anchored
// node in place. Do NOT add a scrollIntoView()/scrollTo() here: an
// earlier version called `document.getElementById(0)?.scrollIntoView()`
// to fix a past scroll-jump complaint, but by the time several articles
// have been read, id "0" is an already-read element far above the
// viewport — forcing a jump to it fights scroll anchoring and is exactly
// the stutter being fixed now.
}
function setInitialLoad(value) {