-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(cdk/scrolling): virtual-scroll flickers during scroll in zoneless mode #29174
Comments
Any updated on this? Encountered the same behavior in my app, thought this was my fault, but even reducing to the most minimal markup didn't help. Running Angular 18 and zoneless. |
Just to confirm that the issue is sill present in |
This is also an issue in the latest release ( |
@xyzmaker1 none that I know... |
@OonihiloO - Thanks for the reply. I saw the PR that you pushed to try to resolve this issue: #29173. I took this as a starting point to test this on my end. If I run the changes that your PR had, I can see that a number of tests fail , but if I only make this change:
The tests appear to pass and the scrolling issue appears to be resolved. This solution appears to be fine but I'll admit that this is the first time that I've ever dug into this codebase before so I'm sure there's something incorrect about this approach. This approach is slightly different than yours as I've kept the logic all within one |
When provideExperimentalZonelessChangeDetection is enabled, virtual-scroll-viewport flickers during scroll because the transform operation becomes visible. This fix moves the style transform into the afterNextRender phase to ensure it stays invisible. Fixes angular#29174
Is this a regression?
The previous version in which this bug was not present was
Introduces in
v18
, as related tozoneless
application feature.Description
When
provideExperimentalZonelessChangeDetection
is enabled,virtual-scroll-viewport
flickers during scroll because thetransform
operation becomes visible.Reproduction
StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-xwe1bt?file=src%2Fcdk-scroll-component.ts
Steps to reproduce:
transform
operation is visible to the end userExpected Behavior
See this StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-xwe1bt?file=src%2Fcdk-scroll-component.ts
It's the same code, but with zone enabled:
Steps to reproduce:
transform
operation is invisible to the end userActual Behavior
StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-xwe1bt?file=src%2Fcdk-scroll-component.ts
Steps to reproduce:
transform
operation is visible to the end userEnvironment
Angular CLI: 18.0.2
Node: 18.20.3
Package Manager: npm 10.2.3
OS: linux x64
Angular: 18.0.1
... animations, cdk, common, compiler, compiler-cli, core, forms
... material, platform-browser
Package Version
@angular-devkit/architect 0.1800.2
@angular-devkit/build-angular 18.0.2
@angular-devkit/core 18.0.2
@angular-devkit/schematics 18.0.2
@angular/cli 18.0.2
@schematics/angular 18.0.2
rxjs 7.8.1
typescript 5.4.5
The text was updated successfully, but these errors were encountered: