-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix($animate): remove ng-animate class after canceling animation #7784
Conversation
There's a fix for this already, #7767 --- which identifies and solves the problem differently. I guess the two of you can decide on which is more appropriate. |
Sorry, my mistake, it doesn't fix #7766. It fixes another problem with similar behavior. And #7767 doesn't fix this new problem. Here is my example with animate.js from #7767 |
So your fix isn't actually about 7766, but a different issue. Anyways, work with matsko on getting it checked in |
Ok, so, @matsko, need you here |
The problem exists in v1.2.x too, #7801 |
@airato great work. I'll put together a test for this and we'll merge it into both 1.2 and 1.3. |
This just landed. Excellent work @airato. |
thank you, @airato :) |
I'm sorry for bumping closed issue, but ng-animate class still staying for (approx.) 5 seconds after animation event (ng-hide in my case). Sorry, I don't have enough time to build emulation in jsFiddle, but you can see recorded video of screen, where you can see this bug: |
@Jamm I don't see the green notification that you're talking about. Are you running an infinite animation? ngAnimate implicitly converts it down to a single iteration. I would be best if you could put together a JS Fiddle for this. |
@matsko in top right corner. No, I don't run any animations, it triggers on ng-show/ng-hide. I'll create fiddle today. |
sorry, bug was caused by interoperation with fa-spin from fontAwesome. For future readers: don't use ng-show and fa-spin in one node :) |
Inifinite keyframe transitions don't work well with ngAnimate. The solution for that is to go something like this: .fa.ng-animate { transition:0s none;
-webkit-transition:0s none;
animation: 0s none;
-webkit-animation: 0s none; } So that the styling won't mix. Don't worry the animation will still run otherwise just not with any intervention from ngAnimate. P.S. If that doesn't work then you may need to use |
ng-animate
class gets stuck on element after canceling animation.Bug example, double click button to catch it
http://plnkr.co/edit/vDQU8sJOKdoluHWdLJvJ?p=preview
Fixes #7766