@@ -102,8 +102,10 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
102
102
103
103
this . $get = [ '$$rAF' , '$rootScope' , '$rootElement' , '$document' , '$$HashMap' ,
104
104
'$$animation' , '$$AnimateRunner' , '$templateRequest' , '$$jqLite' , '$$forceReflow' ,
105
+ '$$isDocumentHidden' ,
105
106
function ( $$rAF , $rootScope , $rootElement , $document , $$HashMap ,
106
- $$animation , $$AnimateRunner , $templateRequest , $$jqLite , $$forceReflow ) {
107
+ $$animation , $$AnimateRunner , $templateRequest , $$jqLite , $$forceReflow ,
108
+ $$isDocumentHidden ) {
107
109
108
110
var activeAnimationsLookup = new $$HashMap ( ) ;
109
111
var disabledElementsLookup = new $$HashMap ( ) ;
@@ -374,7 +376,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
374
376
// past this point if not enabled
375
377
// Animations are also disabled if the document is currently hidden (page is not visible
376
378
// to the user), because browsers slow down or do not flush calls to requestAnimationFrame
377
- var skipAnimations = ! animationsEnabled || documentHidden || disabledElementsLookup . get ( node ) ;
379
+ var skipAnimations = ! animationsEnabled || $$isDocumentHidden ( ) || disabledElementsLookup . get ( node ) ;
378
380
var existingAnimation = ( ! skipAnimations && activeAnimationsLookup . get ( node ) ) || { } ;
379
381
var hasExistingAnimation = ! ! existingAnimation . state ;
380
382
0 commit comments