Skip to content

Commit b354dc5

Browse files
committed
fix(ngAnimate): ensure that minified repaint code isn't removed
Closes angular#9936
1 parent 171b9f7 commit b354dc5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ngAnimate/animate.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,11 @@ angular.module('ngAnimate', ['ng'])
432432
//so that all the animated elements within the animation frame
433433
//will be properly updated and drawn on screen. This is
434434
//required to perform multi-class CSS based animations with
435-
//Firefox. DO NOT REMOVE THIS LINE.
436-
var a = bod.offsetWidth + 1;
435+
//Firefox. DO NOT REMOVE THIS LINE. DO NOT OPTIMIZE THIS LINE.
436+
//THE MINIFIER WILL REMOVE IT OTHERWISE WHICH WILL RESULT IN AN
437+
//UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND WILL
438+
//TAKE YEARS AWAY FROM YOUR LIFE!
439+
bod.cachedWidth = bod.offsetWidth;
437440
fn();
438441
});
439442
};

0 commit comments

Comments
 (0)