-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
This issue was previously reported but closed without a fix. I believe it should be revisited — when using cdk-virtual-scroll-viewport with *cdkVirtualFor, items sometimes render with visible gaps between rows. It appears to be caused by subpixel rounding when calculating item offsets, possibly due to the use of CSS transform for positioning.
reference: #31824
Reproduction
StackBlitz link:
Steps to reproduce:
- Set a solid background color for the cdk-virtual-scroll-viewport.
- Set a different background color for each item rendered with *cdkVirtualFor.
- Zoom the browser window (e.g. 300%) and scroll quickly through the list.
Expected Behavior
Rows should be rendered continuously without visible gaps between them.
Actual Behavior
At certain scroll positions or zoom levels, a thin gap appears between consecutive rows.
Environment
Angular: 20.2.2
Angular CDK: 20.2.9
Browser: Chrome 139, Edge 139 (Windows 10, macOS tested)
Metadata
Metadata
Assignees
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team