parent
00cb28f496
commit
c264be3497
2 changed files with 6 additions and 1 deletions
5
.changeset/witty-bikes-relate.md
Normal file
5
.changeset/witty-bikes-relate.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
fix for #7882 by setting state in page navigation (view transitions)
|
|
@ -187,7 +187,7 @@ const { fallback = 'animate' } = Astro.props as Props;
|
|||
transitionEnabledOnThisPage()
|
||||
) {
|
||||
ev.preventDefault();
|
||||
navigate('forward', link.href);
|
||||
navigate('forward', link.href, { index:currentHistoryIndex, scrollY:0 });
|
||||
currentHistoryIndex++;
|
||||
const newState: State = { index: currentHistoryIndex, scrollY };
|
||||
persistState({ index: currentHistoryIndex - 1, scrollY });
|
||||
|
|
Loading…
Reference in a new issue