aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatias Niemelä2013-09-26 14:29:18 -0400
committerBrian Ford2013-09-30 10:59:28 -0700
commit2df3c9f58def9584455f7c4bfdabbd12aab58bf9 (patch)
tree1e6b553df8ca2e059e96d1c5db78a60530fd440d /src
parent448bd14445e7f8a8aabaa555d43bbf7dff50d58d (diff)
downloadangular.js-2df3c9f58def9584455f7c4bfdabbd12aab58bf9.tar.bz2
fix($animate): ensure transition-property is not changed when only keyframe animations are in use
Closes #3933
Diffstat (limited to 'src')
-rw-r--r--src/ngAnimate/animate.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ngAnimate/animate.js b/src/ngAnimate/animate.js
index af607568..7f37f143 100644
--- a/src/ngAnimate/animate.js
+++ b/src/ngAnimate/animate.js
@@ -627,8 +627,10 @@ angular.module('ngAnimate', ['ng'])
//temporarily disable the transition so that the enter styles
//don't animate twice (this is here to avoid a bug in Chrome/FF).
- node.style[w3cTransitionProp + propertyKey] = 'none';
- node.style[vendorTransitionProp + propertyKey] = 'none';
+ if(transitionTime > 0) {
+ node.style[w3cTransitionProp + propertyKey] = 'none';
+ node.style[vendorTransitionProp + propertyKey] = 'none';
+ }
var activeClassName = '';
forEach(className.split(' '), function(klass, i) {
@@ -637,8 +639,10 @@ angular.module('ngAnimate', ['ng'])
//this triggers a reflow which allows for the transition animation to kick in
element.prop('clientWidth');
- node.style[w3cTransitionProp + propertyKey] = '';
- node.style[vendorTransitionProp + propertyKey] = '';
+ if(transitionTime > 0) {
+ node.style[w3cTransitionProp + propertyKey] = '';
+ node.style[vendorTransitionProp + propertyKey] = '';
+ }
element.addClass(activeClassName);
var css3AnimationEvents = [w3cAnimationEvent, vendorAnimationEvent,