@@ -66,9 +66,9 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
6666 return ( nO . addClass && nO . addClass === cO . removeClass ) || ( nO . removeClass && nO . removeClass === cO . addClass ) ;
6767 } ) ;
6868
69- this . $get = [ '$$rAF' , '$rootScope' , '$rootElement' , '$document' , '$$body' , '$$ HashMap',
69+ this . $get = [ '$$rAF' , '$rootScope' , '$rootElement' , '$document' , '$$HashMap' ,
7070 '$$animation' , '$$AnimateRunner' , '$templateRequest' , '$$jqLite' , '$$forceReflow' ,
71- function ( $$rAF , $rootScope , $rootElement , $document , $$body , $$ HashMap,
71+ function ( $$rAF , $rootScope , $rootElement , $document , $$HashMap ,
7272 $$animation , $$AnimateRunner , $templateRequest , $$jqLite , $$forceReflow ) {
7373
7474 var activeAnimationsLookup = new $$HashMap ( ) ;
@@ -528,7 +528,8 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
528528 }
529529
530530 function areAnimationsAllowed ( element , parentElement , event ) {
531- var bodyElementDetected = isMatchingElement ( element , $$body ) || element [ 0 ] . nodeName === 'HTML' ;
531+ var bodyElement = jqLite ( $document [ 0 ] . body ) ;
532+ var bodyElementDetected = isMatchingElement ( element , bodyElement ) || element [ 0 ] . nodeName === 'HTML' ;
532533 var rootElementDetected = isMatchingElement ( element , $rootElement ) ;
533534 var parentAnimationDetected = false ;
534535 var animateChildren ;
@@ -584,7 +585,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
584585 if ( ! bodyElementDetected ) {
585586 // we also need to ensure that the element is or will be apart of the body element
586587 // otherwise it is pointless to even issue an animation to be rendered
587- bodyElementDetected = isMatchingElement ( parentElement , $$body ) ;
588+ bodyElementDetected = isMatchingElement ( parentElement , bodyElement ) ;
588589 }
589590
590591 parentElement = parentElement . parent ( ) ;
0 commit comments