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

View Transition causes client-side JavaScript not to fire on navigation #7773

Closed
1 task
Cherry opened this issue Jul 23, 2023 · 2 comments
Closed
1 task
Labels
needs triage Issue needs to be triaged

Comments

@Cherry
Copy link
Contributor

Cherry commented Jul 23, 2023

What version of astro are you using?

2.9.1

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

n/a

What package manager are you using?

npm

What operating system are you using?

Windows

What browser are you using?

Chrome

Describe the Bug

When using the experimental view transitions API, any JavaScript defined on a page does not run.

  • Click on "Another Page"
  • View Transition navigation will happen
  • alert will not fire

What's the expected result?

  • Click on "Another Page"
  • View Transition navigation will happen
  • alert fires

If you disable the View Transition (or hit /another-page first), this works as expected. Perhaps this isn't a bug and there's simply an event that should be listened to to accomplish this?

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-ut1vqr

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 23, 2023
@Cherry
Copy link
Contributor Author

Cherry commented Jul 23, 2023

It seems like this may be a similar report to #7765.

@matthewp
Copy link
Contributor

Yeah same, let's track in that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants