primereact icon indicating copy to clipboard operation
primereact copied to clipboard

DataTable/VirtualScroller: Scrolling to the top shows empty table in Firefox

Open Minitron5000 opened this issue 5 months ago • 2 comments

Describe the bug

When using Firefox, sometimes scrolling to the top of the virtual table doesn't show the table content

Reproducer

https://primereact.org/datatable/#virtualscroll

System Information

Browsers: Firefox only, seems to work fine is Chrome and Edge

Steps to reproduce the behavior

  1. Use Firefox
  2. Scroll the table to the bottom using the scrollbar
  3. Scroll the table to the top using the scrollbar
  4. Repeat the steps until the bug appears

Result: The table is empty

Image

Expected behavior

The top of the table should be displayed properly

Minitron5000 avatar Aug 20 '25 08:08 Minitron5000

From what I found in my experiments, adding delay to virtualScrollerOptions fixes the issue. But this workaround is problematic, because it decreases performance. And the larger each table row would be, the larger the delay would have to be. So we need a better solution

Minitron5000 avatar Aug 20 '25 08:08 Minitron5000

Additional bug found:

  1. Use Firefox
  2. Click and hold UP or DOWN button on the scrollbar
Image

Result: Table scrolls for 1 second, then scrolling stops Expected: Scrolling continues until the end of the table is reached

Adding delay also fixes this as a temporary workaround.

Minitron5000 avatar Sep 05 '25 12:09 Minitron5000