From: Daniel Ruf Date: Thu, 28 Feb 2019 13:05:47 +0000 (+0100) Subject: fix: enable and disable scroll if there is no visible reveal X-Git-Tag: v6.6.0~3^2~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11705%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: enable and disable scroll if there is no visible reveal --- diff --git a/js/foundation.reveal.js b/js/foundation.reveal.js index 13ba0f11d..434f9601e 100644 --- a/js/foundation.reveal.js +++ b/js/foundation.reveal.js @@ -273,7 +273,9 @@ class Reveal extends Plugin { this.$element.trigger('closeme.zf.reveal', this.id); } - this._disableScroll(); + if ($('.reveal:visible').length === 0) { + this._disableScroll(); + } var _this = this; @@ -446,7 +448,9 @@ class Reveal extends Plugin { _this.$element.attr('aria-hidden', true); - _this._enableScroll(scrollTop); + if ($('.reveal:visible').length === 0) { + _this._enableScroll(scrollTop); + } /** * Fires when the modal is done closing.