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

Commit ec16352

Browse files
Thomas Belinvojtajina
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 aa4ba23 commit ec16352

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', '$timeout', function($window, $timeout) {
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 rafSupported = !!requestAnimationFrame;
1214
var raf = rafSupported

0 commit comments

Comments
 (0)