-
Notifications
You must be signed in to change notification settings - Fork 27.5k
ngAnimate causes reset (flicker) with ng-view and animate.css in Firefox #4225
Comments
Fixed with 1.2.0-rc.3 Thanks |
Good stuff :) |
@matsko See updated plunker: |
The same problem occurs in 1.2.4 as well. ng-cloak does nothing... |
Thanks for the plunkr link. Looking into it... |
Similar flicker is visible also on iOS7 Safari, and hence also in Phonegap-based apps. V 1.2.4 of Angular. |
The flicker effect occurs because the keyframe animation is delayed until after the reflow starts, but since this is an enter animation that is going on here, the element shows up temporarily. The thing to do here would be to allow the animation to run for 1ms (so that the 0% animation keyframe styles get applied) then pause it and continue after the reflow. The only problem is that the stagger delay gets assigned after the reflow and there is no way in JavaScript to reset a CSS animation without causing a reflow to happen. I'll need to look more into this. The solution now would be to hide the element during the Add this into your CSS code .slide-animation.ng-enter { display:none; }
.slide-animation.ng-enter.ng-enter-active { display:block; } And you'll notice it works: http://plnkr.co/edit/ad129EUZUe2wjgKcEaon?p=preview |
Thanks @matsko . Hopefully there will be a nice permanent fix in the future. |
At the moment there isn't an easy fix. Maybe with 1.3 this could be changed, but it just needs a good explanation in the docs. Closing for now. |
Great news! I think we have a working fix that doesn't request the extra CSS code: http://plnkr.co/edit/ULgte53dNhP64mXdmzOx?p=preview |
…ue a reflow Closes angular#4278 Closes angular#4225
…ue a reflow Closes angular#4278 Closes angular#4225
…ue a reflow Closes angular#4278 Closes angular#4225
…ue a reflow Closes angular#4278 Closes angular#4225
…ue a reflow Closes angular#4278 Closes angular#4225
…ue a reflow Closes angular#4278 Closes angular#4225
…ue a reflow Closes angular#4278 Closes angular#4225
…ue a reflow Closes angular#4278 Closes angular#4225
Seems to be working :-) Thanks! |
…ue a reflow Closes angular#4278 Closes angular#4225
…ue a reflow Closes angular#4278 Closes angular#4225
Transitions must be blocked so that the initial CSS class can be applied without triggering an animation. Keyframes do not need to be blocked since animations are always triggered on the starting CSS class, however, if a stagger animation is set to occur then all elements for index > 0 should be blocked. This is to prevent the animation from occuring early on before the stagger delay for the given element has passed. With ngAnimate and keyframe animations, IE10 and Safari will render a slight flicker effect caused by the blocking. This fix resolves this issue. Closes angular#4225
Just a note, this is still happening with Safari and IE10. However, a PR fix is ready: #6459 |
Transitions must be blocked so that the initial CSS class can be applied without triggering an animation. Keyframes do not need to be blocked since animations are always triggered on the starting CSS class, however, if a stagger animation is set to occur then all elements for index > 0 should be blocked. This is to prevent the animation from occuring early on before the stagger delay for the given element has passed. With ngAnimate and keyframe animations, IE10 and Safari will render a slight flicker effect caused by the blocking. This fix resolves this issue. Closes angular#4225
Transitions must be blocked so that the initial CSS class can be applied without triggering an animation. Keyframes do not need to be blocked since animations are always triggered on the starting CSS class, however, if a stagger animation is set to occur then all elements for index > 0 should be blocked. This is to prevent the animation from occuring early on before the stagger delay for the given element has passed. With ngAnimate and keyframe animations, IE10 and Safari will render a slight flicker effect caused by the blocking. This fix resolves this issue. Closes #4225
This fix has been merged: e71e7b6 |
Thanks Matias. --- Original Message --- From: "Matias Niemelä" notifications@github.com This fix has been merged.e71e7b6 Reply to this email directly or view it on GitHub: |
Hi, I am struggling with a flashing popover in Safari Version 5.1.10 (6534.59.10) Mac OS X 10.6.8. I have read through these comments but I'm a little confused. Was this supposed to have been fixed at this point? I'm running: AngularJS v1.3.0-build.2488+sha.3f2d756 I don't know if there is something I'm supposed to be doing via CSS but I've been trying to get this to work for too long. Could someone let me know what the latest is? Am I using incorrect libraries? Thanks in advance. |
I ran into this after using an animation, specifically: Removing " I used using: angular-animate & angular 1.2.16; |
Instead of display:none & display:block, try visibility:hidden & visibility:visible. display:none changes the done while visibility only causes a re-paint. |
@obiddle solutions works for me, using visibility stops flicker. |
Angularjs: 1.2.0-rc2 & rc1
When I use ngAnimate with animate.css on ng-view it causes some sort of reset after the animation. Which results in a flicker.
Firefox (23.0.1):
http://plnkr.co/edit/BFzq7Gt4KAJlhSGqskIb?p=preview
In Chrome, IE10 and Safari 5.1.7 the animation works without any problems.
Same thing seems to happen with ng-repeat;
The text was updated successfully, but these errors were encountered: