You need to sign in to do that
Don't have an account?
Re-rendering removing SVG-USE tags from Visuaforce page
Hi,
I'm using Lightning Design System with a Visualforce page and using <svg> tag to get SLDS Icons on Page header and Buttons. Initially on page load all works fine but when I try to re-render any <apex:outputPanel> that have <svg> icons inside it, on complete of rerendering it vanish my all <svg> icons.
I tried to debbug it by Inspect element in chrome and found after re-rendering any block my <svg> icon tags are not there.
anyone else experiencing this issue?
Any advise or guidance would be greatly appreciated.
Thanks,
@thatherahere
I'm using Lightning Design System with a Visualforce page and using <svg> tag to get SLDS Icons on Page header and Buttons. Initially on page load all works fine but when I try to re-render any <apex:outputPanel> that have <svg> icons inside it, on complete of rerendering it vanish my all <svg> icons.
I tried to debbug it by Inspect element in chrome and found after re-rendering any block my <svg> icon tags are not there.
anyone else experiencing this issue?
Any advise or guidance would be greatly appreciated.
Thanks,
@thatherahere
<html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
SLDS should not be combined with actionfunction reRender if SVG is involved and instead i would rewrite my Visuaforce page using angular or jquery or React using mordern world SPA framework .
Hope this helps !
Did you ever find a work-around? I am having a similar issue. My icon is in a repeating table row that is re-rendered upon a button click. The re-rendering stops completely when I have have the use xlink tag in the table.
Thanks
Jeff
I tried it with build 0102 but didn't find it working. Can you please share your experience how you achieved it.
I simply created a method in apex class and a Visualforce page with one SVG Icon and CommandButton. Using CommandButton I reRendered my form and the result was same, After completion of that action SVG was not on my page. Its crazy. Am I missing something here?
Thanks,
@thatherahere
Here is my code for Visualforce page and Apex class:
SVGRerendering.cls
SVGRerendering.page
Please review and let me know what I'm missing here.
Thanks,
@thatherahere
For your markup .I am looking into browser to see what stops it from being rendered .Looks for more detailed response from me .Thanks
Here is working code for worst case scenario
Thanks for your help. I already tried this jquery. It works fine for small pages but for large there will be many oncomplete calls so I avoided this trick.
Thank you to those who wrote the original fix! With some messing it worked like a charm.
Just set you apex:page attribute docType="html-5.0" and this will fix the rerender SVG bug
Thanks Magesh,