mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-09 22:39:39 +08:00
fix($animate): ensure class-based animations are always skipped before structural post-digest tasks are run
Closes #5582
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user