Image.STRETCH_FILL doesn't work in Firefox

I encountered a strange bug in Firefox: Image.STRETCH_FILL doesn’t work. Here is an example. Because of this bug, a scene looks completely different in Chrome and Firefox.

Is there any way to make this feature work?

You need to add a preserveAspectRatio="none" attribute in your svg, else Firefox will preserve the aspect ratio.

You should add it to the <svg> tag:

<svg preserveAspectRatio="none" width="217px" height="158px" viewBox="0 0 217 158"
   version="1.1" xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink" 
   xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
1 Like

Thanks, it works now.