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 --- test/ngAnimate/animateSpec.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'test/ngAnimate/animateSpec.js') diff --git a/test/ngAnimate/animateSpec.js b/test/ngAnimate/animateSpec.js index 207cfedb..ec37d8c3 100644 --- a/test/ngAnimate/animateSpec.js +++ b/test/ngAnimate/animateSpec.js @@ -1723,6 +1723,29 @@ describe("ngAnimate", function() { }); }); + it("should not perform the active class animation if the animation has been cancelled before the reflow occurs", function() { + inject(function($compile, $rootScope, $animate, $sniffer, $timeout) { + if(!$sniffer.transitions) return; + + ss.addRule('.animated.ng-enter', '-webkit-transition: 2s linear all;' + + 'transition: 2s linear all;'); + + var element = html($compile('