mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-15 06:47:50 +08:00
fix($animate): ensure the active class is not applied if cancelled during reflow
Closes #4699
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user