diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index 17a725e39..a6553612e 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -234,10 +234,11 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }; var prevPos; + var screenInactive = true; function getScrollPosition() { var scrollPosition = $ionicScrollDelegate.getScrollPosition(); - if (!scrollPosition) { + if (!scrollPosition || screenInactive) { $window.requestAnimationFrame(function() { getScrollPosition(); }); @@ -283,6 +284,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun var scrollWatcherInitialized; $scope.$on("$ionicView.enter", function(event, data) { + $timeout(function() { + screenInactive = false; + }, 200); if (scrollWatcherInitialized || !$scope.amountIsCollapsible) { return; } @@ -324,6 +328,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun // }); $scope.$on("$ionicView.leave", function(event, data) { + screenInactive = true; lodash.each(listeners, function(x) { x(); }); diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 7e7e69d92..91cf7b66b 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -89,7 +89,7 @@ on-refresh="onRefresh()"> -