From e53ff431e1472c0b2d5405d267d4e403ca31087e Mon Sep 17 00:00:00 2001 From: Matias Niemelä Date: Sat, 2 Nov 2013 14:14:13 -0400 Subject: fix($animate): ensure the active class is not applied if cancelled during reflow Closes #4699 --- src/ngAnimate/animate.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ngAnimate/animate.js') 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) { -- cgit v1.2.3