Fix sticking scroll logic #3599
No reviewers
Labels
No labels
BE Request
Backlog
Better behavior
Blocked by deps
Bug
Code Review
Discussion
Doing
Feature Request / Enhancement
In the shining bright future maybe
It's complicated
MS Edge
Mememoon (or other niche browsers)
Missing API
Missing feature
Missing l10n/i18n
NL1
NL2
NL4
Need to verify on develop
RELEASE BLOCKER
Reassign or Close
Refactor
Regression
Safari
To Do
User story
Waiting on godot
accessibility
better documentation
chore
confirmed
easy ticket
incident
l10n update
mastoapi
mobile
needs design
needs-info
needs-review
stupid
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
pleroma/pleroma-fe!3599
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-scroll-bugs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes chats glitching out when scrolled to bottom
Fixes chats not sticking to bottom on new posts
Fixes timeline not sticking to top on new posts
Fix scroll on thread expansion/collapse in userprofile
WIP: Fix sticking scroll logicto Fix sticking scroll logic/oc review
opencode-agent:job=167:generation=1
Verdict
No findings. This PR is approved — merge-readiness 5/5.
Scope reviewed
Base-to-head diff (
dc1f287→928c658), 3 files, +89/−51:src/composables/useVirtualScrolling.js—getShiftrewrite with anchor-miss compensationsrc/components/conversation/conversation.js—scrollOffsetrework to measured DOM offsets, height clampingchangelog.d/scrollfixes.skip— empty skip fileWhat I verified
invertDirection, sticking): anchor-miss path now scrolls by the exact added-bottom height. The old code scrolled by the full body height here, which matches the reported glitching.0via theisSticking && boundary === 'top'guard, so new posts no longer push a top-anchored view down.beItem→bNearestItemspan), equivalent to the old first/last-item fallback.getShift'sa[getExtreme(a)]/b[getExtreme(b)]indexing is only reachable when both lists are non-empty (explosion/implosion return earlier), andb[-1]/b[-2]misses safely yieldundefined→return 0.-embeddedcheck is real:timeline.jsadds the-embeddedroot class for embedded timelines, soclassName.includes('-embedded')matches as intended.findLastIndexis the same ES2023 generation as thefindLastit replaces.topprop is still passed bytimeline.vue(falls through as a harmless HTML attribute) andexpandOffset = 0is dead — both nits, no behavior impact.Validation run
build/update-emoji.js+ Playwright deps first).biome checkon both changed source files: clean.