Firefox won't print inline SVG from external file

1k views Asked by At

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.

0

There are 0 answers