From 67a3fa4fafddf34de3beb52d7fb4945c1c3e5a92 Mon Sep 17 00:00:00 2001 From: Kevin Ball Date: Wed, 18 May 2016 12:55:17 -0700 Subject: [PATCH] Fix issue with explicit close logic --- js/foundation.reveal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } }, -- 2.47.2