Skip to content

Commit 0218858

Browse files
committed
fix(viewSwitcher): use ionic.requestAnimationFrame
This greatly improves perceived performance, especially on Android, and fixes #3907
1 parent c5a4f7d commit 0218858

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: js/angular/service/viewSwitcher.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ function($timeout, $document, $q, $ionicClickBlock, $ionicConfig, $ionicNavBarDe
191191
if (renderStart && renderEnd) {
192192
// CSS "auto" transitioned, not manually transitioned
193193
// wait a frame so the styles apply before auto transitioning
194-
$timeout(onReflow, 16);
194+
ionic.requestAnimationFrame(onReflow);
195195

196196
} else if (!renderEnd) {
197197
// just the start of a manual transition

0 commit comments

Comments
 (0)