From: Jérôme Lebleu Date: Tue, 7 Mar 2017 11:49:59 +0000 (+0100) Subject: Hide Reveal overlay after the modal when using Motion UI X-Git-Tag: v6.4.0-rc1~78^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1570dc2d35bf1f8490c1d3efd5083176837ba074;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Hide Reveal overlay after the modal when using Motion UI --- diff --git a/js/foundation.reveal.js b/js/foundation.reveal.js index b18538add..6bf4e7d15 100644 --- a/js/foundation.reveal.js +++ b/js/foundation.reveal.js @@ -368,18 +368,17 @@ class Reveal { // Motion UI method of hiding if (this.options.animationOut) { - if (this.options.overlay) { - Foundation.Motion.animateOut(this.$overlay, 'fade-out', finishUp); - } - else { - finishUp(); - } - - Foundation.Motion.animateOut(this.$element, 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(); + } + }); } // jQuery method of hiding else { - this.$element.hide(this.options.hideDelay); if (this.options.overlay) {