fix(router-outlet): hide leaving view after transition finishes (#19335)

This commit is contained in:
Liam DeBeasi
2019-09-24 19:45:58 +01:00
committed by GitHub
parent 61f04e50b1
commit bfa17d1594

View File

@ -69,8 +69,13 @@ export class RouterOutlet implements ComponentInterface, NavOutlet {
(shouldComplete, step, dur) => {
if (this.ani) {
this.animationEnabled = false;
this.ani.onFinish(() => {
this.animationEnabled = true;
if (this.swipeHandler) {
this.swipeHandler.onEnd(shouldComplete);
}
}, { oneTimeCallback: true });
// Account for rounding errors in JS
@ -94,9 +99,6 @@ export class RouterOutlet implements ComponentInterface, NavOutlet {
this.ani.progressEnd(shouldComplete, newStepValue, dur);
}
if (this.swipeHandler) {
this.swipeHandler.onEnd(shouldComplete);
}
}
);
this.swipeHandlerChanged();