fix($animate): ensure the active class is not applied if cancelled during reflow

Closes #4699
This commit is contained in:
Matias Niemelä
2013-11-02 14:14:13 -04:00
parent 974b6d4a5b
commit e53ff431e1
2 changed files with 28 additions and 0 deletions

View File

@@ -898,6 +898,11 @@ angular.module('ngAnimate', ['ng'])
// This triggers a reflow which allows for the transition animation to kick in.
afterReflow(function() {
if(!element.hasClass(className)) {
done();
return;
}
if(timings.transitionDuration > 0) {
node.style[transitionProp + propertyKey] = '';
if(ii > 0 && stagger.transitionDelay > 0 && stagger.transitionDuration === 0) {