New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xlink:href svg disappear bug in IE11 and below #3195
Comments
Your repro doesn't show the source code. |
I've attached the source. |
http://codepen.io/anon/pen/NAgRVm?editors=1010 One 'solution' for you it to use a string template or script tag template, but that will only solve your current issue. There's many times, e.g. list rendering, where vue will use Ideally you would have an |
Close (5 days inactivity) |
If you use symbols instead of groups, will work in IE11, with this polyfill svgxuse |
@fergaldoyle almost 2 years later, one of the greatest wtf IE moments of my dev path. |
We were able to fix this by using the |
Using |
Neither of these worked for me. My icons still disappear. Everything I'm reading online says that if you have a symbol based SVG system, and are referencing nodes that exist on the page (not external), |
After a riveting day of SVG fun, this isn't a Vue issue. If you notice any weirdness with your icons, make a test html page and work with that. Embed the svg icon in HTML without Vue to make sure it works fine, then add your loaders and only do it with javascript to see how your loaders change the HTML markup. Only after this should you then finally add your TLDR: Ultimately, what I went with was updating my svgs not to have I learned about compound paths when giving up and trying to use a font icon building site. They wouldn't convert my icons unless they were in something called a "compound path". So I figured out what that was and figured out how to convert them to svgs that were defined in one path element. This solution obviously doesn't work if you want to style individual bits of the SVG, but for an icon font, it worked pretty well. What about styling individual parts of the SVG? My main caution is: stay away from Tools/Solutions Other stuff
|
+1 for svg4everybody, it's what enabled us the IE11 compat. |
Vue.js version
1.0.26
Reproduction Link
http://vue-xlink-ie-bug.handcraft.com/index.html
Steps to reproduce
Load the page. As soon as vue is activated, the arrow-down svg icon inside the
<button>
disappears on IE11 and below.What is Expected?
I expect the icon to remain. This behaviour is correct in browsers such as chrome, edge or firefox.
What is actually happening?
The icon is a xlink:href svg icon that vue is trying te re-render, which for some reason fails.
I know of an ugly workaround, which is:
However, this should not be required to render xlink:href svg's.
Source:
The text was updated successfully, but these errors were encountered: