From 7cd1b705a0c45a49c23155bb667368bb6cd4f8bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matias=20Niemel=C3=A4?= Date: Mon, 30 Mar 2015 21:21:09 -0700 Subject: [PATCH] fix(ngAnimate): ensure that minified repaint code isn't removed Closes #9936 --- src/ngAnimate/animate.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ngAnimate/animate.js b/src/ngAnimate/animate.js index 71ed2ec4d0d5..b87ed335cb2b 100644 --- a/src/ngAnimate/animate.js +++ b/src/ngAnimate/animate.js @@ -432,9 +432,11 @@ angular.module('ngAnimate', ['ng']) //so that all the animated elements within the animation frame //will be properly updated and drawn on screen. This is //required to perform multi-class CSS based animations with - //Firefox. DO NOT REMOVE THIS LINE. - var a = bod.offsetWidth + 1; - fn(); + //Firefox. DO NOT REMOVE THIS LINE. DO NOT OPTIMIZE THIS LINE. + //THE MINIFIER WILL REMOVE IT OTHERWISE WHICH WILL RESULT IN AN + //UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND WILL + //TAKE YEARS AWAY FROM YOUR LIFE! + fn(bod.offsetWidth); }); }; }])