-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix($animateCss): avoid flicker caused by temporary classes #15463
Conversation
I wish we could come up with a more straightforward fix. Adding, removing, re-adding temporary classes doesn't feel good (both from a maintenance and a robustness perspective). AFAICT, |
tempClasses is undocumented, but supposed to be documented, see #9549 |
The important thing is that it is not documented right now 😁 --
The reason why To be clear, I am not proposing to ditch --
I am not sure I agree. (OK, actually I am sure I disagree 😛) BTW, the only relevant mention I could find is the
|
Currently, this only affects `ngHide`/`ngShow` animations (but the problem was more general and could theoretically affect other animations in the future). Adding the temporary classes immediately, while forcing a reflow before starting the animation, could cause flickering. This commit fixes the issue, by not applying the temporary classes until the animation actually starts. Since `tempClasses` was an undocumented, private feature (surrently only used for `ngHide`/`ngShow`), it will not affect custom animations. Alternative approach to angular#15463. Fixes angular#14015 Closes angular#15463
Currently, this only affects `ngHide`/`ngShow` animations (but the problem was more general and could theoretically affect other animations in the future). Adding the temporary classes immediately, while forcing a reflow before starting the animation, could cause flickering. This commit fixes the issue, by not applying the temporary classes until the animation actually starts. Since `tempClasses` was an undocumented, private feature (currently only used for `ngHide`/`ngShow`), no other built-in or custom animations will be affected. Alternative approach to angular#15463. Fixes angular#14015 Closes angular#15463
Currently, this only affects `ngHide`/`ngShow` animations (but the problem was more general and could theoretically affect other animations in the future). Adding the temporary classes immediately, while forcing a reflow before starting the animation, could cause flickering. This commit fixes the issue, by not applying the temporary classes until the animation actually starts. Since `tempClasses` was an undocumented, private feature (currently only used for `ngHide`/`ngShow`), no other built-in or custom animations will be affected. Alternative approach to angular#15463. Fixes angular#14015 Closes angular#15463
A PR is worth a thousand words 😃 |
This PR doesn't work unfortunately in all cases. |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
bug fix
What is the current behavior? (You can also link to an open issue here)
See #14015
Does this PR introduce a breaking change?
No
Please check if the PR fulfills these requirements
[ ] Docs have been added / updated (for bug fixes / features)Other information: