From 7e55359798a5e2f6010d0ec8f71e2ef534c67c35 Mon Sep 17 00:00:00 2001 From: Karl Date: Sat, 22 Oct 2022 14:17:34 -0500 Subject: Fix part 1 of bug #51 The bug seems to be caused by, when magnific popup detects that the browser is mobile, it changes the lightbox from fixed positioning to absolute, and it sets the top offset based on current scroll position. But now - with the URL changing to reflect the link to the current image displayed, the browser changes its scroll as the user changes image. And - magnific doesn't recompute the top offset. I'm not sure why magnific feels like it needs to change away from fixed positioning - it has code that handles IE 7 and other very old browsers though, so I think it's to handle old browser. I'm not concerned with browsers more than about a year old, and fixed positioning on mobile browsers has worked well much longer than that. I hope this fix doesn't create an additional bug, but in some quick testing I don't see other bugs. --- assets/js/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/js/main.js b/assets/js/main.js index 8927bce..123996a 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -244,6 +244,7 @@ window.location.hash = ""; }, }, + fixedContentPos: true, }); // If there's a fragment id, see if it's an image index -- cgit v1.2.3