From: Kevin Ball Date: Wed, 18 May 2016 19:55:17 +0000 (-0700) Subject: Fix issue with explicit close logic X-Git-Tag: v6.2.2-rc2~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8808%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Fix issue with explicit close logic --- diff --git a/js/foundation.reveal.js b/js/foundation.reveal.js index 50b010e30..12ab457e3 100644 --- a/js/foundation.reveal.js +++ b/js/foundation.reveal.js @@ -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); } },