Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental view transitions breaks navigation on the same page #7803

Closed
1 task
NinoMaj opened this issue Jul 25, 2023 · 2 comments · Fixed by #7824
Closed
1 task

Experimental view transitions breaks navigation on the same page #7803

NinoMaj opened this issue Jul 25, 2023 · 2 comments · Fixed by #7824
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@NinoMaj
Copy link

NinoMaj commented Jul 25, 2023

What version of astro are you using?

2.9.3

Are you using an SSR adapter? If so, which one?

No

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

Hi Astro team,

Thanks for shipping experimental view transitions API, huge win for the web.
I've just tested it and it breaks navigation on the same page.

// index.astro
<a href="/blog">blog</a>
<a href="#test">test</a>

<div id="test">test</a>
  1. navigate to another route - /blog
  2. go back to original route -/
  3. navigate to an id on the same page - #test
  4. nothing happens

What's the expected result?

div is scrolled into a view.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-a9ccjq-n4vkah?file=src%2Fpages%2Findex.astro,astro.config.mjs,src%2Flayouts%2FLayout.astro,src%2Fpages%2Fblog.astro,package.json&on=stackblitz

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 25, 2023
@matthewp matthewp self-assigned this Jul 25, 2023
@matthewp matthewp added - P4: important Violate documented behavior or significantly impacts performance (priority) and removed needs triage Issue needs to be triaged labels Jul 25, 2023
@matthewp
Copy link
Contributor

Thanks! Will take a look.

@Alecyrus
Copy link

Alecyrus commented Jul 29, 2023

@matthewp Hi! Matthew. Did you notice the following error in devtools?
CleanShot 2023-07-29 at 20 24 45@2x
Be more specifically, this error is related to View Transition feature.
CleanShot 2023-07-29 at 20 26 04@2x

I upgrade the astro to latest version(2.9.6), but the error is still there.

there is a minimal repo: online
reproduce steps:

  1. navigate to /blog

then you will see the error in chrome devtools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants