Skip to content

Commit

Permalink
maybe fix #81
Browse files Browse the repository at this point in the history
  • Loading branch information
9001 committed Apr 3, 2024
1 parent f471b05 commit 9c42cbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions copyparty/web/baguettebox.js
Original file line number Diff line number Diff line change
Expand Up @@ -591,12 +591,13 @@ window.baguetteBox = (function () {
document.documentElement.style.overflowY = 'auto';
document.body.style.overflowY = 'auto';
}
if (overlay.style.display === 'none')
return;

if (options.duringHide)
options.duringHide();

if (overlay.style.display === 'none')
return;

sethash('');
unbindEvents();
try {
Expand Down
3 changes: 1 addition & 2 deletions copyparty/web/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4873,10 +4873,10 @@ var thegrid = (function () {
baguetteBox.destroy();

var br = baguetteBox.run(isrc, {
noScrollbars: true,
duringHide: r.onhide,
afterShow: function () {
r.bbox_opts.refocus = true;
document.body.style.overflow = 'hidden';
},
captions: function (g) {
var idx = -1,
Expand All @@ -4899,7 +4899,6 @@ var thegrid = (function () {
};

r.onhide = function () {
document.body.style.overflow = '';
if (!thegrid.ihop)
return;

Expand Down

0 comments on commit 9c42cbe

Please sign in to comment.