Skip to content

Commit

Permalink
Merge pull request #11705 from DanielRuf/fix/11704-reveal-enable-disa…
Browse files Browse the repository at this point in the history
…ble-scroll-visible

fix: enable and disable scroll if there is no visible reveal
  • Loading branch information
kball authored Aug 12, 2019
2 parents 86deccd + 2931b57 commit f77a4bc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/foundation.reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit f77a4bc

Please sign in to comment.