]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fix issue with explicit close logic 8808/head
authorKevin Ball <kmball11@gmail.com>
Wed, 18 May 2016 19:55:17 +0000 (12:55 -0700)
committerKevin Ball <kmball11@gmail.com>
Wed, 18 May 2016 19:55:17 +0000 (12:55 -0700)
js/foundation.reveal.js

index 50b010e30e05329d956cfbadb61af2611e2856d3..12ab457e304dfb4278dd70dfd5c296460ce72fcf 100644 (file)
@@ -136,7 +136,8 @@ class Reveal {
     this.$element.on({
       'open.zf.trigger': this.open.bind(this),
       'close.zf.trigger': (event, $element) => {
-        if ($(event.target).parents('[data-closable]')[0] === $element) { // only close reveal when it's explicitly called
+        if ((event.target === _this.$element[0]) ||
+            ($(event.target).parents('[data-closable]')[0] === $element)) { // only close reveal when it's explicitly called
           return this.close.apply(this);
         }
       },