diff --git a/copyparty/web/baguettebox.js b/copyparty/web/baguettebox.js index 45e72d22..4c0ff4bc 100644 --- a/copyparty/web/baguettebox.js +++ b/copyparty/web/baguettebox.js @@ -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 { diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 98c651a8..99868864 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -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, @@ -4899,7 +4899,6 @@ var thegrid = (function () { }; r.onhide = function () { - document.body.style.overflow = ''; if (!thegrid.ihop) return;