From 9c42cbec6ff0cfee00c36f1fb6612692d28220d9 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 3 Apr 2024 00:28:15 +0000 Subject: [PATCH] maybe fix #81 --- copyparty/web/baguettebox.js | 5 +++-- copyparty/web/browser.js | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) 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;