Skip to content

Commit

Permalink
Change scrollbars hiding solution. Resolves #59
Browse files Browse the repository at this point in the history
  • Loading branch information
feimosi committed May 27, 2016
1 parent 2754817 commit 7d7ab9c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/baguetteBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@

function showOverlay(chosenImageIndex) {
if (options.noScrollbars) {
document.body.style.overflow = 'hidden';
document.documentElement.style.overflowY = 'hidden';
document.body.style.overflowY = 'scroll';
}
if (overlay.style.display === 'block') {
return;
Expand Down Expand Up @@ -430,7 +431,8 @@

function hideOverlay() {
if (options.noScrollbars) {
document.body.style.overflow = 'auto';
document.documentElement.style.overflowY = 'auto';
document.body.style.overflowY = 'auto';
}
if (overlay.style.display === 'none') {
return;
Expand Down

0 comments on commit 7d7ab9c

Please sign in to comment.