Skip to content

Question: Auto-scroll occurs when scrolling upward while items are dynamically appended #864

@tsujimic

Description

@tsujimic

I'm building a chat-like UI where answers to a question are appended dynamically and displayed using Virtualizer.

While the content is still being appended, if I scroll in the opposite direction (upwards), the scroll position automatically jumps back toward the forward direction (downwards).

It's difficult to explain clearly in words, so I’ve attached a video showing the behavior.

Because the item sizes are not finalized while the data is still increasing, I suspect this might be a difficult problem to solve. However, I wanted to ask:

Is there a recommended way to handle this behavior?
Any advice or guidance would be greatly appreciated.

virtua-negative-scroll-direction.mp4

Platform

  • OS: macOS
  • Browser: Chrome
  • Version of this package: 0.48.6
  • Framework: Next.js 16.1.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions