Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kc0bfv/autophugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl <kc0bfv@gmail.com>2022-10-22 22:17:34 +0300
committerKarl <kc0bfv@gmail.com>2022-10-22 22:17:34 +0300
commit7e55359798a5e2f6010d0ec8f71e2ef534c67c35 (patch)
treecbfe973dbc0b4f568fdf2f1bf547f0c29c0c17ea
parentd601f46bb1805ace0577151a154e00ee6043e88c (diff)
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.
-rw-r--r--assets/js/main.js1
1 files changed, 1 insertions, 0 deletions
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