Skip to content

Commit

Permalink
(fix) Don't exit full screen if it's not actually open
Browse files Browse the repository at this point in the history
  • Loading branch information
feimosi committed Sep 16, 2018
1 parent 8d038e3 commit 95ba270
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/baguetteBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,9 @@
overlay.className = '';
setTimeout(function() {
overlay.style.display = 'none';
exitFullscreen();
if (document.fullscreen) {
exitFullscreen();
}
if (options.bodyClass && document.body.classList) {
document.body.classList.remove(options.bodyClass);
}
Expand Down

0 comments on commit 95ba270

Please sign in to comment.