diff options
| author | Matias Niemelä | 2013-11-02 14:14:13 -0400 |
|---|---|---|
| committer | Matias Niemelä | 2013-11-05 21:44:02 -0500 |
| commit | e53ff431e1472c0b2d5405d267d4e403ca31087e (patch) | |
| tree | ec56bc60377f92abee1816872e96b701056c2d59 /src | |
| parent | 974b6d4a5b402c9911aef8adf2f3d30aae1ba8ed (diff) | |
| download | angular.js-e53ff431e1472c0b2d5405d267d4e403ca31087e.tar.bz2 | |
fix($animate): ensure the active class is not applied if cancelled during reflow
Closes #4699
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngAnimate/animate.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ngAnimate/animate.js b/src/ngAnimate/animate.js index 64be7ba7..ad192a5b 100644 --- a/src/ngAnimate/animate.js +++ b/src/ngAnimate/animate.js @@ -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) { |
