From: Jérôme Lebleu Date: Sun, 9 Apr 2017 14:47:02 +0000 (+0200) Subject: Maintain behavior when closing Reveal with Motion UI X-Git-Tag: v6.4.0-rc1~78^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9848%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Maintain behavior when closing Reveal with Motion UI --- 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 {