Links created in svgs are not working in latest Chrome, Firefox and Safari
See original GitHub issuePreflight Checklist
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Describe the bug
When exporting an image that contains a link, the link does not work in the latest Chrome, Firefox, Safari. Draw.io uses xlink:href
to create links in svg images. This is a deprecated feature of svg v2 and apparently modern browsers already removed support for this.
To Reproduce Steps to reproduce the behavior:
- Go to ‘app.diagrams.net’
- Create a new diagram
- Add a link to a diagram
- Export diagram to svg
- Open svg image in latest Chrome/Safari/Firefox
- Try to click on the link element
Expected behavior The element with the link is clickable.
Screenshots N/a
draw.io version (In the Help->About menu of the draw.io editor):
- draw.io version 13.1.3]
Desktop (please complete the following information):
- OS: Mac OS 10.15.4
- Browser Chrome (81.0.4044.138), Safari (13.1 (15609.1.20.111.8)), Firefox (76.0.1)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
The SVG logo does not display my site on firefox
The SVG logo on my site is not showing up on firefox, it works fine on Chrome, Egde, safari, .. How to fix...
Read more >Svg image element not displaying in Safari - Stack Overflow
In the <image> tag inside the svg element, href works fine in Chrome. To work in older versions of Safari, you need xlink:href...
Read more >Here's How I Solved a Weird Bug Using Tried and True ...
At first, this looks like a CSS issue. Some styles might be applied on a hover event that breaks the layout or the...
Read more >Intructions for viewing SVG images
Most major browsers now have native support for SVGs. We have had good results with recent versions of Firefox, Chrome and Opera. If...
Read more >Browser Support for Viewing SVG Files - SAS Help Center
3 When an animated SVG file is opened in Safari, the Refresh button does not work. You need to refresh the browser. Using...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Starlight220 To fix that, ensure the
<a>
element in your SVG has thetarget
attribute as described here: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/targetIn draw.io, you can experiment with values of that attribute if you go to
File
>Export as
>SVG
, then click theLinks
drop-down and select something other thanautomatic
.This embeds the diagram, but when links are pressed the linked page is rendered only in the space that the diagram occupied. Ideas?