Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit cea44b3

Browse files
Thomas BelinIgorMinar
Thomas Belin
authored andcommitted
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 #6535 Closes #6535 Closes #6540
1 parent e8c6b9b commit cea44b3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ng/raf.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
function $$RAFProvider(){ //rAF
44
this.$get = ['$window', function($window) {
55
var requestAnimationFrame = $window.requestAnimationFrame ||
6-
$window.webkitRequestAnimationFrame;
6+
$window.webkitRequestAnimationFrame ||
7+
$window.mozRequestAnimationFrame;
78

89
var cancelAnimationFrame = $window.cancelAnimationFrame ||
9-
$window.webkitCancelAnimationFrame;
10+
$window.webkitCancelAnimationFrame ||
11+
$window.mozCancelAnimationFrame;
1012

1113
var raf = function(fn) {
1214
var id = requestAnimationFrame(fn);

0 commit comments

Comments
 (0)