7

I cannot get Firefox to print an svg from an external file.

I have an icons.svg file with a lot of different icons. I embed them into the page using the following code:

<svg class="icon icon-sort">
    <use xlink:href="/icons.svg#icon-sort"></use>
</svg>

My icons.svg looks like this:

<svg style="position: absolute; width: 0; height: 0;" width="0" height="0" version="1.1" xmlns="http://www.w3.org/2000/svg">
    <defs>
        <symbol id="icon-sort" viewBox="0 0 1024 1024">
            <title>sort</title>
            <path class="path1" d="M960 432h-896l448-432z"></path>
            <path class="path2" d="M960 592h-896l448 432z"></path>
        </symbol>
    </defs>
</svg>

In Chrome, everything prints fine, in Firefox, it is blank. I am also using the svgxuse polyfill, but I have the same issues with and without it.

You can use the following link for an example, none of the SVG's print in Firefox:

https://icomoon.io/svgxuse-demo/

I am using Firefox v50.

Sean
  • 1,758
  • 3
  • 20
  • 34
  • 4
    Sadly a known bug in Firefox, see e.g (from 2017) https://bugzilla.mozilla.org/show_bug.cgi?id=1309046 – timbru31 Jan 17 '17 at 13:05

0 Answers0