-
Notifications
You must be signed in to change notification settings - Fork 24.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
rc.5 [ngClass] is re-rendering on scroll #34336
Comments
Thnx for reporting @rokerkony ! We we've found it independently during the internal testing / benchmarking and working on a fix. I will keep this one open to make sure that the WIP fix takes care of this one. Again, thnx for taking time to report and share a reproduce scenario! |
I am seeing a similar issue but without the need to scroll as its a static spa that is full screen i can see elements jittering in the console constantly. video below |
Same here on Ivy. NgClass constantly repaint the class attribute. |
Maybe #34307 fixes this? |
…changes Prior to this change, in Ivy mode ngStyle/ngClass would accidentally emit value changes for static (string-based) values even if the value itself had not changed. This patch ensures that the style/class diffing code is more strict and when it signals ngClass/ngStyle that there has been a value change. Fixes angular#34336, angular#34444
…changes Prior to this change, in Ivy mode ngStyle/ngClass would accidentally emit value changes for static (string-based) values even if the value itself had not changed. This patch ensures that the style/class diffing code is more strict and when it signals ngClass/ngStyle that there has been a value change. Fixes angular#34336, angular#34444
…changes Prior to this change, in Ivy mode ngStyle/ngClass would accidentally emit value changes for static (string-based) values even if the value itself had not changed. This patch ensures that the style/class diffing code is more strict and when it signals ngClass/ngStyle that there has been a value change. Fixes angular#34336, angular#34444
…changes Prior to this change, in Ivy mode ngStyle/ngClass would accidentally emit value changes for static (string-based) values even if the value itself had not changed. This patch ensures that the style/class diffing code is more strict and when it signals ngClass/ngStyle that there has been a value change. Fixes angular#34336, angular#34444
…changes (#34307) Prior to this change, in Ivy mode ngStyle/ngClass would accidentally emit value changes for static (string-based) values even if the value itself had not changed. This patch ensures that the style/class diffing code is more strict and when it signals ngClass/ngStyle that there has been a value change. Fixes #34336, #34444 PR Close #34307
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 bug report
Affected Package
Probably related to Ivy?
Is this a regression?
it was not re-rendering in ng8
Description
By using
[ngClass]
on angular 9...rc.5 the class value is re-rendering all over again when using HostListener and window scroll event.By using I mean:
It probably kills performance due to the constant changing of the DOM but also we have a component working with images and this behavior makes them reload all over again.
🔬 Minimal Reproduction
I created a video(as gif) to show this error:
also created a gist with 3 files to reproduce it:
https://gist.github.com/rokerkony/dbd4e5f4f5307e38f7e1350755693fca
🌍 Your Environment
Angular Version:
The text was updated successfully, but these errors were encountered: