components icon indicating copy to clipboard operation
components copied to clipboard

fix(cdk/scrolling): Prevent virtual scroll 'flickering' with zoneless

Open atscott opened this issue 8 months ago • 0 comments

This fixes the perceived flickering due to the transform sometimes becoming visible with zoneless due to the macrotask-based scheduler. The transform cannot be simply moved inside afterNextRender because it causes differences in timing that can break certain scroll implementations (http://b/335066372).

This approach fiddles with the details of ngZone.run and avoiding unnecessary extra ApplicationRef.tick calls. We could instead put everything inside an ngZone.run and call ApplicationRef.tick in there, but that would result in a second tick when the ngZone.run exits.

atscott avatar May 28 '25 14:05 atscott