diff --git a/src/ngAnimate/animateQueue.js b/src/ngAnimate/animateQueue.js index 374377de8b6e..55e6d000ede4 100644 --- a/src/ngAnimate/animateQueue.js +++ b/src/ngAnimate/animateQueue.js @@ -524,8 +524,8 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { } function areAnimationsAllowed(element, parentElement, event) { - var bodyElementDetected = false; - var rootElementDetected = false; + var bodyElementDetected = isMatchingElement(element, bodyElement); + var rootElementDetected = isMatchingElement(element, $rootElement); var parentAnimationDetected = false; var animateChildren;