summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/dirty-dolls-joke.md5
-rw-r--r--packages/astro/src/transitions/router.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/dirty-dolls-joke.md b/.changeset/dirty-dolls-joke.md
new file mode 100644
index 000000000..fc14a2a7a
--- /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 e0e93c845..af8a09d97 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 = '';