Skip to content

Fix jitter and flicker in continuous scrolled mode#1417

Open
lulu2jinchi wants to merge 1 commit intofuturepress:masterfrom
lulu2jinchi:fix/mobile-continuous-scroll-jitter
Open

Fix jitter and flicker in continuous scrolled mode#1417
lulu2jinchi wants to merge 1 commit intofuturepress:masterfrom
lulu2jinchi:fix/mobile-continuous-scroll-jitter

Conversation

@lulu2jinchi
Copy link

Summary

  • stabilize continuous manager location calculation during fast scroll in scrolled-continuous
    • reduce visual flicker around section boundaries on mobile

Root cause

  • check() could read stale scroll offsets while prepend/append/recycle was running
    • SCROLLED could fire before check() completed, reporting transient locations
    • visible iframes were repeatedly show()-ed, triggering unnecessary repaint
    • offscreen views were trimmed too aggressively during momentum scroll

Changes

  • add getScrollPosition() / syncScrollPosition() and use synced offsets in check()
    • defer SCROLLED emission until queued check() completes; skip stale callbacks via scrolledRequestId
    • call view.show() only when visibility is hidden
    • add scheduleTrim() to delay trim until scroll delta calms down
    • clear trim/scroll timers in destroy()

Scope

  • file: src/managers/continuous/index.js
    • no public API changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant