@@ -66,9 +66,9 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
66
66
return ( nO . addClass && nO . addClass === cO . removeClass ) || ( nO . removeClass && nO . removeClass === cO . addClass ) ;
67
67
} ) ;
68
68
69
- this . $get = [ '$$rAF' , '$rootScope' , '$rootElement' , '$document' , '$$body' , '$$ HashMap',
69
+ this . $get = [ '$$rAF' , '$rootScope' , '$rootElement' , '$document' , '$$HashMap' ,
70
70
'$$animation' , '$$AnimateRunner' , '$templateRequest' , '$$jqLite' , '$$forceReflow' ,
71
- function ( $$rAF , $rootScope , $rootElement , $document , $$body , $$ HashMap,
71
+ function ( $$rAF , $rootScope , $rootElement , $document , $$HashMap ,
72
72
$$animation , $$AnimateRunner , $templateRequest , $$jqLite , $$forceReflow ) {
73
73
74
74
var activeAnimationsLookup = new $$HashMap ( ) ;
@@ -502,7 +502,8 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
502
502
}
503
503
504
504
function areAnimationsAllowed ( element , parentElement , event ) {
505
- var bodyElementDetected = isMatchingElement ( element , $$body ) || element [ 0 ] . nodeName === 'HTML' ;
505
+ var bodyElement = jqLite ( $document [ 0 ] . body ) ;
506
+ var bodyElementDetected = isMatchingElement ( element , bodyElement ) || element [ 0 ] . nodeName === 'HTML' ;
506
507
var rootElementDetected = isMatchingElement ( element , $rootElement ) ;
507
508
var parentAnimationDetected = false ;
508
509
var animateChildren ;
@@ -558,7 +559,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
558
559
if ( ! bodyElementDetected ) {
559
560
// we also need to ensure that the element is or will be apart of the body element
560
561
// otherwise it is pointless to even issue an animation to be rendered
561
- bodyElementDetected = isMatchingElement ( parentElement , $$body ) ;
562
+ bodyElementDetected = isMatchingElement ( parentElement , bodyElement ) ;
562
563
}
563
564
564
565
parentElement = parentElement . parent ( ) ;
0 commit comments