DataTable/VirtualScroller: Scrolling to the top shows empty table in Firefox
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
- Use Firefox
- Scroll the table to the bottom using the scrollbar
- Scroll the table to the top using the scrollbar
- Repeat the steps until the bug appears
Result: The table is empty
Expected behavior
The top of the table should be displayed properly
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
Additional bug found:
- Use Firefox
- Click and hold UP or DOWN button on the scrollbar
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.