diff --git a/.changeset/dirty-dolls-joke.md b/.changeset/dirty-dolls-joke.md new file mode 100644 index 000000000000..fc14a2a7ac3e --- /dev/null +++ b/.changeset/dirty-dolls-joke.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Increase the scroll restoration throttle time diff --git a/packages/astro/src/transitions/router.ts b/packages/astro/src/transitions/router.ts index e0e93c845171..af8a09d97643 100644 --- a/packages/astro/src/transitions/router.ts +++ b/packages/astro/src/transitions/router.ts @@ -515,7 +515,7 @@ if (inBrowser) { addEventListener('popstate', onPopState); addEventListener('load', onPageLoad); if ('onscrollend' in window) addEventListener('scrollend', onScroll); - else addEventListener('scroll', throttle(onScroll, 300)); + else addEventListener('scroll', throttle(onScroll, 350), { passive: true }); } for (const script of document.scripts) { script.dataset.astroExec = '';