Uh oh!
There was an error while loading. Please reload this page.
Toimage bug - #604
Conversation
…eturn proper url for svg downloads
| break; | ||
| case 'svg': | ||
| imgData = svg; | ||
| imgData = url; |
There was a problem hiding this comment.
The imgData must be an actual URL to work as a download via a link.
etpinard
commented
Jun 6, 2016
Great. @mdtusz Can you try this patch on browserstack (if you haven't already) ? I think the easiest way is:
|
Looks all good for Chrome, FF, Safari, and IE11 (svg)! 🎉 |
etpinard
commented
Jun 6, 2016
💃 |
kimli42
commented
Mar 22, 2017
From which version of Safari does this work? I have plotly v.1.23.0 and downloading images (scattergl plot specifically is what I tested) doesn't work in Safari 8. |
@kimli42 For reference: Safari 8 was released on Oct 16, 2014. Current is Safari 10. Are you able to download this plot? https://plot.ly/~chris/17389.embed It works for me in Safari 10. |
kimli42
commented
Mar 22, 2017
Unfortunately, you can't upgrade to the latest Safari (on Mac) without upgrading the OS. That is why I was asking if anyone else was able to use this feature in Safari 8. |
rreusser
commented
Mar 22, 2017
Is there a specific error in the console? There is already some code to handle specific browsers, so it's definitely a tricky issue to get working across all browsers past and present. |
kimli42
commented
Mar 23, 2017
There's no error in the console. I've encountered this before trying to developing a file downloader in legacy Safari. |
gschivley
commented
Mar 29, 2017
I've seen the closed issue #250, but can't get .png downloads to work with the latest plotly and Safari 10.0. |
Fixes#600.
This PR fixes a nasty little bug with image downloads. The culprit was font-family strings that were quoted and breaking the svg string used for image conversions.
The fix is not exactly pretty, but should be more robust now (previously, the quotation marks were escaped before the svg was converted to a string - Chrome seems to not care for that and automatically replaces the double quotation marks.