mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(ionicView): erase saved scroll for a view on back
This commit is contained in:
2
js/ext/angular/src/service/ionicView.js
vendored
2
js/ext/angular/src/service/ionicView.js
vendored
@@ -152,6 +152,7 @@ angular.module('ionic.service.view', ['ui.router', 'ionic.service.platform'])
|
||||
// they went back one, set the old current view as a forward view
|
||||
rsp.viewId = backView.viewId;
|
||||
rsp.navAction = 'moveBack';
|
||||
currentView.scrollValues = {}; //when going back, erase scrollValues
|
||||
if(backView.historyId === currentView.historyId) {
|
||||
// went back in the same history
|
||||
rsp.navDirection = 'back';
|
||||
@@ -225,6 +226,7 @@ angular.module('ionic.service.view', ['ui.router', 'ionic.service.platform'])
|
||||
stateName: this.getCurrentStateName(),
|
||||
stateParams: this.getCurrentStateParams(),
|
||||
url: $location.url(),
|
||||
scrollValues: null
|
||||
});
|
||||
|
||||
// add the new view to this history's stack
|
||||
|
||||
Reference in New Issue
Block a user