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

[BUGFIX beta] preventDefault in SVG LinkTo #20443

Closed
wants to merge 1 commit into from
Closed

[BUGFIX beta] preventDefault in SVG LinkTo #20443

wants to merge 1 commit into from

Conversation

Recour
Copy link

@Recour Recour commented Apr 18, 2023

When wrapping LinkTo in an SVG element, the click event.currentTarget is not an instanceof HTMLAnchorElement but of SVGAElement. preventDefault is only triggered when isSelf, but it needs to be triggered when wrapped inside an SVG as well, otherwise clicking the element causes a reload.

Fix for #19891

@MelSumner
Copy link
Contributor

MelSumner commented Apr 25, 2023

Question: Is it valid HTML to put a link inside of an SVG? Typically it should be the other way around. Additionally, an SVG is not eligible to receive interactions (but a link is).

@Recour Recour closed this by deleting the head repository Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants