diff options
| author | Thomas Belin | 2014-03-04 17:22:02 +0100 | 
|---|---|---|
| committer | Igor Minar | 2014-03-13 16:31:11 -0700 | 
| commit | cea44b3e861e070a857f7a962ed600ace3678798 (patch) | |
| tree | e3fd3a528fad818191c8aa5142e77f6752fe40fd /src/ng/raf.js | |
| parent | e8c6b9bf25835685f666cbfb3022e66cf7e2308e (diff) | |
| download | angular.js-cea44b3e861e070a857f7a962ed600ace3678798.tar.bz2 | |
fix (ngAnimate): fix requestAnimationFrame for old version of Firefox
The recent $$RAFProvider which is a wrapper for the native
requestAnimationFrame method doesn't use the mozRequestAnimationFrame.
Old versions of FF (20 for example) crash if ngAnimate is included
No breaking changes and fix issue https://github.com/angular/angular.js/issues/6535
Closes #6535
Closes #6540
Diffstat (limited to 'src/ng/raf.js')
| -rw-r--r-- | src/ng/raf.js | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/src/ng/raf.js b/src/ng/raf.js index f85ee12a..f4eb31c0 100644 --- a/src/ng/raf.js +++ b/src/ng/raf.js @@ -3,10 +3,12 @@  function $$RAFProvider(){ //rAF    this.$get = ['$window', function($window) {      var requestAnimationFrame = $window.requestAnimationFrame || -                                $window.webkitRequestAnimationFrame; +                                $window.webkitRequestAnimationFrame || +                                $window.mozRequestAnimationFrame;      var cancelAnimationFrame = $window.cancelAnimationFrame || -                               $window.webkitCancelAnimationFrame; +                               $window.webkitCancelAnimationFrame || +                               $window.mozCancelAnimationFrame;      var raf = function(fn) {        var id = requestAnimationFrame(fn); | 
