]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Maintain behavior when closing Reveal with Motion UI 9848/head
authorJérôme Lebleu <jerome@maroufle.fr>
Sun, 9 Apr 2017 14:47:02 +0000 (16:47 +0200)
committerJérôme Lebleu <jerome@maroufle.fr>
Sun, 9 Apr 2017 14:51:05 +0000 (16:51 +0200)
js/foundation.reveal.js

index 6bf4e7d15c64a5924c1ffb610d2e9cea8e1cad73..0026f9046242d8b0199944a835fffac97ccc3a5e 100644 (file)
@@ -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 {