mirror of
https://github.com/withastro/astro.git
synced 2025-02-24 22:46:02 -05:00
Increase the scroll restoration throttle time (#8981)
* Increase the scroll restoration throttle time * Add changeset * Update packages/astro/src/transitions/router.ts Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> --------- Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
This commit is contained in:
parent
74fa4adba0
commit
ab7e745cc9
2 changed files with 6 additions and 1 deletions
5
.changeset/dirty-dolls-joke.md
Normal file
5
.changeset/dirty-dolls-joke.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Increase the scroll restoration throttle time
|
|
@ -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 = '';
|
||||
|
|
Loading…
Add table
Reference in a new issue