diff options
| author | Misko Hevery | 2013-05-01 20:01:27 -0400 |
|---|---|---|
| committer | Misko Hevery | 2013-05-02 15:22:16 -0400 |
| commit | 9956baedd73d5e8d0edd04c9eed368bd3988444b (patch) | |
| tree | 5c37c2b81fea497aff4075db27f4a3cd3345fbc1 /src/ng/animator.js | |
| parent | 1d8e11ddfbd6b08ff02df4331f6df125f49da3dc (diff) | |
| download | angular.js-9956baedd73d5e8d0edd04c9eed368bd3988444b.tar.bz2 | |
fix(ngView): accidentally compiling leaving content
closes: #2304
Diffstat (limited to 'src/ng/animator.js')
| -rw-r--r-- | src/ng/animator.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ng/animator.js b/src/ng/animator.js index 536c93c1..d79822f7 100644 --- a/src/ng/animator.js +++ b/src/ng/animator.js @@ -272,14 +272,17 @@ var $AnimatorProvider = function() { var durationKey = 'Duration'; var duration = 0; + //we want all the styles defined before and after forEach(element, function(element) { - var globalStyles = $window.getComputedStyle(element) || {}; - duration = Math.max( - parseFloat(globalStyles[w3cTransitionProp + durationKey]) || - parseFloat(globalStyles[vendorTransitionProp + durationKey]) || - 0, - duration); + if (element.nodeType == 1) { + var globalStyles = $window.getComputedStyle(element) || {}; + duration = Math.max( + parseFloat(globalStyles[w3cTransitionProp + durationKey]) || + parseFloat(globalStyles[vendorTransitionProp + durationKey]) || + 0, + duration); + } }); $window.setTimeout(done, duration * 1000); } else { |
