While trying to add some nice SVG images as bullet points for my site, I came across some real strange behaviour and what appears to be a bug in Firefox. I've debugged it to the following MWE:
Source code
I have the following HTML document:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
ul {
list-style-image: url('listImage.svg');
}
</style>
</head>
<body>
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
</body>
</html>
I also have the following SVG file called listImage.svg
:
<svg xmlns="http://www.w3.org/2000/svg">
<g>
<circle cx="0" cy="0" r="4" />
</g>
</svg>
The problem
When I open the HTML document in Firefox, the list appears as it should, with the SVG nicely appearing as the bullet point of the list:
But when I refresh the page or reload the page, they sometimes disappear:
While refreshing the page, the images seemingly random keep appearing and disappearing again. Doing a hard refresh instead (with Ctrl + F5) or deleting the cache and offline website data doesn't change this.
Specific browsers
This problem is only happening in Firefox
Firefox Quantum 65.0 (64-bits)
Firefox Developer Edition 66.0b4 (64-bits)
In other browsers I did not have any problems, the images always appeared.
Internet Explorer 11
Version: 11.523.17134.0
Updateversions: 11.0.105 (KB4480965)
Edge
42.17134.1.0
Microsoft EdgeHTML 17.17134
(If someone could provide information about Google Chrome, please edit and add it to the question. I used some online tool and the results of that suggest that the SVG appears fine in Google Chrome, however I don't think this test is solid proof for it)
Why is this happening?
Related questionsI found this question that might be related, however this question is different since I'm only having this issue in Firefox and the answer(s) to that question have not solved my problem.