aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Belin2014-03-04 17:22:02 +0100
committerIgor Minar2014-03-13 16:31:11 -0700
commitcea44b3e861e070a857f7a962ed600ace3678798 (patch)
treee3fd3a528fad818191c8aa5142e77f6752fe40fd /src
parente8c6b9bf25835685f666cbfb3022e66cf7e2308e (diff)
downloadangular.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')
-rw-r--r--src/ng/raf.js6
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);