diff --git a/js/angular/controller/scrollController.js b/js/angular/controller/scrollController.js index a342d0bf26..05d365b90b 100644 --- a/js/angular/controller/scrollController.js +++ b/js/angular/controller/scrollController.js @@ -67,7 +67,10 @@ function($scope, scrollViewOptions, $timeout, $window, $location, $document, $io $scope.$on('$destroy', function() { deregisterInstance(); - scrollView.__cleanup(); + //Windows: make sure the scrollView.__cleanup exists before calling it + if (scrollView.__cleanup) { + scrollView.__cleanup(); + } ionic.off('resize', resize, $window); $window.removeEventListener('resize', resize); scrollViewOptions = null; diff --git a/js/angular/service/viewService.js b/js/angular/service/viewService.js index f27794ead9..92e5c114a3 100644 --- a/js/angular/service/viewService.js +++ b/js/angular/service/viewService.js @@ -9,6 +9,36 @@ IonicModule $log.warn('$ionicViewService' + oldMethod + ' is deprecated, please use $ionicHistory' + newMethod + ' instead: http://ionicframework.com/docs/nightly/api/service/$ionicHistory/'); } + // always reset the keyboard state when change stage + $rootScope.$on('$stateChangeStart', function(){ + //Windows: no hide method available + if (ionic.keyboard.hide) { + ionic.keyboard.hide(); + } + }); + + $rootScope.$on('viewState.changeHistory', function(e, data) { + if(!data) return; + + var hist = (data.historyId ? $rootScope.$viewHistory.histories[ data.historyId ] : null ); + if(hist && hist.cursor > -1 && hist.cursor < hist.stack.length) { + // the history they're going to already exists + // go to it's last view in its stack + var view = hist.stack[ hist.cursor ]; + return view.go(data); + } + + // this history does not have a URL, but it does have a uiSref + // figure out its URL from the uiSref + if(!data.url && data.uiSref) { + data.url = $state.href(data.uiSref); + } + + if(data.url) { + // don't let it start with a #, messes with $location.url() + if(data.url.indexOf('#') === 0) { + data.url = data.url.replace('#', ''); + } warn('', ''); var methodsMap = { diff --git a/release/js/ionic-angular.js b/release/js/ionic-angular.js index 4c0fa7c0b2..0b68bb3c51 100644 --- a/release/js/ionic-angular.js +++ b/release/js/ionic-angular.js @@ -6559,7 +6559,10 @@ function($scope, scrollViewOptions, $timeout, $window, $location, $document, $io $scope.$on('$destroy', function() { deregisterInstance(); - scrollView.__cleanup(); + //Windows: make sure the scrollView.__cleanup exists before calling it + if (scrollView.__cleanup) { + scrollView.__cleanup(); + } ionic.off('resize', resize, $window); $window.removeEventListener('resize', resize); scrollViewOptions = null; diff --git a/scss/_scaffolding.scss b/scss/_scaffolding.scss index bdbaa8b209..1d6d9f8576 100644 --- a/scss/_scaffolding.scss +++ b/scss/_scaffolding.scss @@ -41,6 +41,7 @@ body, text-rendering: optimizeLegibility; -webkit-backface-visibility: hidden; -webkit-user-drag: none; + -ms-content-zooming: none; } body.grade-b,