angular / angular/components

bug(cdk-virtual-scroll): Scrolling fast makes the viewport blank until scrolling stops

Open
#20,971 14 comments 12 reactions 0 assignees View on GitHub
area: cdk/scrolling P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Reproduction

https://stackblitz.com/edit/angular-qxcwbr

Steps to reproduce:
There are two virtual scroll viewports - the first has the problem. Take the scroll bar with the mouse and scroll down fast. The whole viewport will be blank as long as you scroll.
The second viewport uses a bizarre fix and if you try the same it will magically work.

#### Expected Behavior

Both of the viewports should scroll without viewport going blank

#### Actual Behavior

Without the bizarre fix the viewport becomes blank while fast scrolling

#### Environment

- Angular: 10.2.2
- CDK/Material: 10.2.7
- Browser(s): Chrome Version 86.0.4240.111 (Official Build) (64-bit)
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction and confirm the blank viewport during fast scrollbar movement. Then trace the Angular CDK virtual-scroll implementation and compare the two viewports, including the one using the reported workaround. Done means both viewports remain populated while scrolling quickly, with regression coverage for the reproduced behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.