-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 transitions: transitionEnabledOnThisPage
returns true
when fallback is set to none
#11528
Comments
Hi @bholmesdev, yes, in retrospective one might expect that ;-) Would be happy to see your PR on this! In the meanwhile you could extend your test with |
I was unaware we had a If I were to make a PR, it would just add that |
Yes, please! Regarding the original intend you could talk to Matthew. Inside the client side router it is not used as "SPA-mode" but "The client-side router code is available on that page in case we need to reload". I skimmed our uses and it looks like adding Alternatively, you could add a new function along the lines of "SPA routing". |
@martrapp is this something we can still do for 5.0? It doesn't break internal expectations? |
Yes, I guess, we can. But I only skimmed through the uses. |
Having a second look at the whole thing: @bholmesdev, @matthewp: Even though I can understand when reading the name of the function raises expectations that it might do something else, I guess we should have better justification for an incompatible change to a published function. People might have used it in their own components to differentiate as the docs suggest. |
Hi @bholmesdev, this issue has been sitting here for quite a while. |
I think we can close. |
@matthewp agreed. I don't feel strongly enough to push this forward, and I no longer use the function in my own code |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Firefox, Safari
Describe the Bug
I built a library that reruns a user's script whenever view transitions are enabled. I toggle this behavior using
transitionEnabledOnThisPage
fromastro:transitions/client
. However, I noticed this returnstrue
even when fallback is set tonone
and my browser does not support view transitions.What's the expected result?
I am using
transitionEnabledOnThisPage
to determine whether theastro:page-load
event will fire. Sinceastro:page-load
does not fire when the fallback is set tonone
, I would expecttransitionEnabledOnThisPage
to returnfalse
.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-gcu7qh?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: