This commit is contained in:
syuilo 2025-03-20 16:34:50 +09:00
parent 71188b3463
commit 0007723405

View file

@ -183,14 +183,14 @@ onMounted(() => {
lightbox?.pswp?.element?.focus({ lightbox?.pswp?.element?.focus({
preventScroll: true, preventScroll: true,
}); });
history.pushState(null, '', '#pswp'); window.history.pushState(null, '', '#pswp');
}); });
lightbox.on('destroy', () => { lightbox.on('destroy', () => {
focusParent(activeEl, true, false); focusParent(activeEl, true, false);
activeEl = null; activeEl = null;
if (window.location.hash === '#pswp') { if (window.location.hash === '#pswp') {
history.back(); window.history.back();
} }
}); });