-
-
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
Using ViewTransitions API from SVG element #9001
Comments
Looks like we need to handle anchor tags inside SVG specifically to support this, which is always tricky to handle:
Example handlers: |
Hi @adrianAzoitei, thank you for pointing out that issue and for providing the minimal example. In deed the current implementation already calls closest() as you suggested:
As @bluwy said, the problem is that the check for HTMLAnchorElement ignores SVGAElements. Thanks @bluwy for the quick and enlightening analysis! @adrianAzoitei do you want to submit the pull request or should i fix? |
Thanks both for the insights! I’ll submit a PR. |
I just tried the repo and it does seem to be working for me. Steps I followed:
|
Hi @adrianAzoitei, do you need any assistance with your PR? I would be very happy if we could deliver this with the next minor release in the middle of next week. |
@martrapp can only get to it the week after that. If anyone else has the bandwidth & and wants to pick it up, by all means. |
Hi @adrianAzoitei, thanks for your quick reply. I will keep you updated. |
@adrianAzoitei, links inside |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I have an SVG element wrapped with
<a href="..."></a>
. It seems that, in this case, a full page refresh happens all the time, instead of Astro intercepting the click event and transitioning between the two pages.Reproducible code:
What does fix it is if I intercept the
onclick
event and callnavigate()
.What's the expected result?
When clicking an
<a>
element, Astro is able to intercept the event and perform the transition between pages.Link to Minimal Reproducible Example
https://github.com/adrianAzoitei/svg-transitions
Participation
The text was updated successfully, but these errors were encountered: