diff options
| author | Matias Niemelä | 2014-01-02 12:01:46 -0500 |
|---|---|---|
| committer | Matias Niemelä | 2014-01-03 12:14:15 -0500 |
| commit | bc492c0fc17257ddf2bc5964e205379aa766b3d8 (patch) | |
| tree | 821f69fc3ef97dacc403f299f3b5efad928132b5 /src | |
| parent | 162144202caa1bf42a576783f39d9145fa9b20ea (diff) | |
| download | angular.js-bc492c0fc17257ddf2bc5964e205379aa766b3d8.tar.bz2 | |
fix($animate): ensure class-based animations are always skipped before structural post-digest tasks are run
Closes #5582
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngAnimate/animate.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ngAnimate/animate.js b/src/ngAnimate/animate.js index 5f8dc673..64ed3029 100644 --- a/src/ngAnimate/animate.js +++ b/src/ngAnimate/animate.js @@ -610,9 +610,14 @@ angular.module('ngAnimate', ['ng']) } var animations = []; + //only add animations if the currently running animation is not structural //or if there is no animation running at all - if(!ngAnimateState.running || !(isClassBased && ngAnimateState.structural)) { + var allowAnimations = isClassBased ? + !ngAnimateState.disabled && (!ngAnimateState.running || !ngAnimateState.structural) : + true; + + if(allowAnimations) { forEach(matches, function(animation) { //add the animation to the queue to if it is allowed to be cancelled if(!animation.allowCancel || animation.allowCancel(element, animationEvent, className)) { |
