Skip to content

React: Rendered elements get stuck on scroll #1053

@infuriating

Description

@infuriating

Describe the bug

When using React-Aria components (ComboBox, ListBox, etc.) i n combination with @tanstack/react-virtual inside a dialog, the list stops rendering new elements correctly.

  • At the page level, everything works as expected.
  • Inside a dialog, the list freezes: it does not render new items unless the user either reopens the popover or modifies the search input.

Debugging shows that the virtualizer is updating its internal items, but these updates are not reflected in the rendered list inside the dialog.

Your minimal, reproducible example

https://codesandbox.io/p/devbox/nwcs5n

Steps to reproduce

Normal example

  1. Open the item bar.
  2. Scroll through the list using one of the following methods:
    • Scroll wheel
    • Scrollbar
    • Arrow keys or Spacebar (with the popover focused)

Modal example

  1. Open the dialog.
  2. Open the item bar within the dialog.
  3. Scroll through the list using one of the following methods:
    • Scroll wheel
    • Scrollbar
    • Arrow keys or Spacebar (with the popover focused)

Expected behavior

Normal example: The list scrolls normally without freezing, nothing out of the ordinary should happen.

Dialog example: From the moment the user uses the scrollbar or navigates with arrow keys / Spacebar, the list freezes and doesn't update the elements.

How often does this bug happen?

Every time

Screenshots or Videos

Image

Platform

  • OS: macOS 15.6.1
  • Browser: Arc
  • Browser version: 39.0.7258.156

tanstack-virtual version

v3.13.12

TypeScript version

v5.9.2

Additional context

No response

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions