🏠 back to Observable

Download .png not working for a cell in Firefox

#1

Maybe I’m doing something weird in the map cell for this notebook, but I can’t get the Download .png function to work. It works in Chrome on this map and I can download images in other notebooks in Firefox.
Firefox Version 66.0.3 (64-bit)

Thanks!
Evan

#2

Hey Evan,

Looks like you’re running into an 8 year old Firefox bug around drawImage and SVG elements that don’t have width/height attributes - this apparently falls into a zone where no specification tells the browsers what to do, and Firefox is splitting the baby by adopting a rather idiosyncratic behavior.

Anyway, I suggested a change to your notebook that hardcodes with & height attributes to make Firefox happy - if you use the built-in width value, you can get the same responsive layout you had before. Also filed a bug on our internal tracker to see whether we can automatically work around this problem in the future.

-Tom

1 Like
#3

Thanks for your help.

#4

And thanks for reporting this, Evan!

We’ve just pushed a fix that should prevent this Firefox issue from happening again. (We now set the dimensions of the SVG -> PNG to the actual size of the SVG on the page.)