Skip to content

Commit 5dcd1d3

Browse files
committed
use a forced reflow in place of a timeout
1 parent 699f86c commit 5dcd1d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ngAnimate/animate.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,10 @@ angular.module('ngAnimate', ['ng'])
548548
done();
549549
} else {
550550
var activeClassName = '';
551-
$timeout(startAnimation, 1, false);
551+
// force the browser to do a reflow before starting the animation
552+
// this will make sure that transitions are applied correctly
553+
element.prop('clientWidth');
554+
startAnimation();
552555

553556
//this acts as the cancellation function in case
554557
//a new animation is triggered while another animation

0 commit comments

Comments
 (0)