From 0d227232382f38036d6397e72e82a595b9fe8399 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Sun, 9 Apr 2017 16:47:02 +0200 Subject: [PATCH] Maintain behavior when closing Reveal with Motion UI --- js/foundation.reveal.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/js/foundation.reveal.js b/js/foundation.reveal.js index 6bf4e7d15..0026f9046 100644 --- a/js/foundation.reveal.js +++ b/js/foundation.reveal.js @@ -368,14 +368,11 @@ class Reveal { // Motion UI method of hiding if (this.options.animationOut) { - Foundation.Motion.animateOut(this.$element, this.options.animationOut, () => { - if (this.options.overlay) { - Foundation.Motion.animateOut(this.$overlay, 'fade-out', finishUp); - } - else { - finishUp(); - } - }); + if (this.options.overlay) { + Foundation.Motion.animateOut(this.$overlay, 'fade-out'); + } + + Foundation.Motion.animateOut(this.$element, this.options.animationOut, finishUp); } // jQuery method of hiding else { -- 2.47.2