diff --git a/ionic/animations/animation.ts b/ionic/animations/animation.ts index e25f010609..da31b167a8 100644 --- a/ionic/animations/animation.ts +++ b/ionic/animations/animation.ts @@ -587,23 +587,18 @@ class Animate { } progress(value) { - let animation = this.ani; - - if (animation) { + if (this.ani) { // passed a number between 0 and 1 - if (animation.playState !== 'paused') { - animation.pause(); + if (this.ani.playState !== 'paused') { + this.ani.pause(); } - if (value < 0.999) { - animation.currentTime = (this.duration * value); - - } else { - // don't let the progress finish the animation - animation.currentTime = (this.duration * 0.999); - } + // don't let the progress finish the animation + // leave it off JUST before it's finished + value = Math.min(0.999, Math.max(0.001, value)); + this.ani.currentTime = (this.duration * value); } }