Closed TonyLuo closed 9 years ago
@TonyLuo upgrade to 1.0.5, just released. This should now be fixed
it still has the same issue after upgrade to 1.0.5 or 1.0.6. I fixed it by moving the scrollDelegate.scrollTop() from $ionicView.beforeEnter to $ionicView.afterEnter
$scope.$parent.$on('$ionicView.beforeEnter', function () {
if (scrollDelegate) {
//scrollDelegate.scrollTop();
}
});
/**
* Ionic sets the active/cached nav-bar AFTER the afterEnter event is called, so we need to set a small
* timeout to let the nav-bar logic run.
*/
$scope.$parent.$on('$ionicView.afterEnter', function () {
initCoordinates();
$timeout(function () {
init();
isNavBarTransitioning = false;
if (scrollDelegate) {
scrollDelegate.scrollTop();
}
}, 20, false);
});
My project has 3 tabs, it works well using version 1.0.2. I try to use 1.0.3 or 1.0.4, I get following error.
TypeError: Cannot read property 'scrollTo' of null at ionic-angular.js:7066 at processQueue (angular.js:14634) at angular.js:14650 at completeOutstandingRequest (angular.js:5490) at angular.js:5762