From 02188585014a5fdb291c17bcd0268cf315ac106c Mon Sep 17 00:00:00 2001 From: Andrei Alecu Date: Sat, 21 Nov 2015 19:09:57 +0200 Subject: [PATCH] fix(viewSwitcher): use ionic.requestAnimationFrame This greatly improves perceived performance, especially on Android, and fixes https://github.com/driftyco/ionic/issues/3907 --- js/angular/service/viewSwitcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/angular/service/viewSwitcher.js b/js/angular/service/viewSwitcher.js index bea56a2aa54..5481d8dc39c 100644 --- a/js/angular/service/viewSwitcher.js +++ b/js/angular/service/viewSwitcher.js @@ -191,7 +191,7 @@ function($timeout, $document, $q, $ionicClickBlock, $ionicConfig, $ionicNavBarDe if (renderStart && renderEnd) { // CSS "auto" transitioned, not manually transitioned // wait a frame so the styles apply before auto transitioning - $timeout(onReflow, 16); + ionic.requestAnimationFrame(onReflow); } else if (!renderEnd) { // just the start of a manual transition