stop menu animation when closed (#19234)

fixes #19203
This commit is contained in:
Liam DeBeasi
2019-09-03 12:02:22 -04:00
committed by GitHub
parent c7b302c7a6
commit 07140cf2c5
2 changed files with 6 additions and 4 deletions

View File

@ -379,9 +379,7 @@ export class Menu implements ComponentInterface, MenuI {
const delta = computeDelta(detail.deltaX, this._isOpen, this.isEndSide);
const stepValue = delta / this.width;
this.animation
.progressStep(stepValue);
this.animation.progressStep(stepValue);
}
private onEnd(detail: GestureDetail) {
@ -491,6 +489,10 @@ export class Menu implements ComponentInterface, MenuI {
this.backdropEl.classList.remove(SHOW_BACKDROP);
}
if (this.animation) {
this.animation.stop();
}
// emit close event
this.ionDidClose.emit();
}

View File

@ -1031,7 +1031,7 @@ export const createAnimation = () => {
});
if (initialized) {
cleanUp();
cleanUpElements();
initialized = false;
}