#Override scroll restoration in custom swap

2 messages · Page 1 of 1 (latest)

teal iron
#

Look at this example: https://stackblitz.com/edit/withastro-astro-queig9xm?file=src%2Flayouts%2FLayout.astro

When you scroll down, then click the link, Astro immediately scrolls, but I'd prefer that to take place after the exit animation (I deliberately didn't use view transitions here, as classical CSS animations are sometimes mightier). Originally I opened a RFC but @feral river said it's possible to override the scroll restoration in astro:after-swap, hence I opened this thread!

feral river
#

I’ll take a look 😉