From 176b38a4cbc5a8d5e9a4b9dd5f9062a90931919a Mon Sep 17 00:00:00 2001 From: saicaca Date: Sat, 22 Jun 2024 01:03:08 +0800 Subject: [PATCH] fix: custom scrollbar does not reload after page switch --- src/layouts/Layout.astro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 211a1d8..f1837a4 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -327,6 +327,7 @@ const setup = () => { window.swup.hooks.on('link:click', () => { document.documentElement.style.setProperty('--content-delay', '0ms') }) + window.swup.hooks.on('content:replace', initCustomScrollbar) } if (window.swup.hooks) { setup()