question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setup issue: SVG sprite buttons not display in Firefox

See original GitHub issue

Expected behaviour

Like in Edge: image

Actual behaviour

image

Environment

  • Browser: Firefox
  • Version: 60.0b16 (64 bit)
  • Operating System: MS Windows 10 x64
  • Version: 1709 (16299.371)

Steps to reproduce

File is builded using Python with module yattag scripts: jQuery, Bootstrap, and plyr

File structure:

β”‚Β Β 
β”œβ”€β”€ html
|   β”œβ”€β”€ vtt
|   β”œβ”€β”€ jpg
|   β”œβ”€β”€ mp4
β”‚Β Β  └── html
└── media
    β”œβ”€β”€ js
    |   β”œβ”€β”€ bootrap.js
    |   β”œβ”€β”€ jquery.js
    |   β”œβ”€β”€ font-awesome,js
    |   └── data.js (here is script intilalizing plyr)
    β”œβ”€β”€ css
    |   β”œβ”€β”€ bootrap.css 
    |   β”œβ”€β”€ my css
    |   β”œβ”€β”€ font-awesome,js
    |   └── data.js (here is script intilalizing plyr)
    β”œβ”€β”€ img
    |   └── jpg's
    β”œβ”€β”€ blank.mp4
    β”œβ”€β”€ plyr.min.js
    β”œβ”€β”€ plyr.css
    β”œβ”€β”€ plyr.css.map
 Β Β  └── plyr.svg
<video controls crossorigin playsinline id=player poster="local path to poster">
    <source src="local path to file" type="video/mp4" />
    <track kind="captions" label="English" srclang="en" src="local path to vtt file" default="" \>
</video>

<script src="../media/plyr.min.js"></script>
document.addEventListener('DOMContentLoaded', () => { 
  const player = new Plyr('#player', {
    iconUrl: '../media/plyr.svg'
  });
});

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
sampottscommented, Jun 9, 2018

I think I’ve found the issue. It’s meant to work like this:

  • Check local storage has a sprite and it if does load from there
  • Make the XHR request
  • Update local storage for next page view as well as update sprite in DOM

The problem is if the sprite already exists, it doesn’t inject again as there’s a check to see if it exists and return. I’ll get this one fixed today.

0reactions
fridaycommented, Jun 19, 2018

This should be fixed by now. If not, let us know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The SVG logo does not display my site on firefox
The problem is that you have the image in a link in a floated element, which is itself in a floated element. By...
Read more >
SVG use external source not working on firefox - Stack Overflow
This explains my problem. I added the sprite in the same parent folder and it worked on Firefox. Chrome and safari didn't mind...
Read more >
SVG icons are not displaying IE 11 - Salesforce Developers
Hi All, I have use a SVG icon for a button that is displaying in Chrome and Firefox but not displaying in IE...
Read more >
Icon System with SVG Sprites - CSS-Tricks
If you use IcoMoon to generate your SVG sprite (using the SVG button rather than Font), it puts the SVG inside the HTML...
Read more >
Material Icons Guide | Google Fonts
Setup Method 1. ... The icons are available for download in SVG or PNGs, formats that are ... Using the font is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found