-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
dangerouslySetInnerHTML not working in SVG elements on Edge browser #7506
Comments
Thanks for the report @jasford, at first glance it seems like a potential regression in Edge. I tested in Do you have the exact build number for the Edge version you're using, just in case? I'm trying to update to |
Looks like I took that screenshot from |
I've seen this issue too. |
I think Edge regressed somewhere between |
FWIW IE11 is actually still broken too. Need to fix that. @patrickkettner - perhaps you know somebody who can look into this from the Edge side since it seems like there's a regression on that side of things. |
Happy to. Will dive in tomorrow morning On Aug 30, 2016 4:38 PM, "Paul O’Shannessy" notifications@github.com
|
So, a few things.
So what to do depends on what y'all want to support, @zpao. You could have a super small feature detect ( Happy to write anything or create a PR, just lemme know what you would like |
Thanks for getting back to us @patrickkettner! Totally get confusing versions (Gecko & Firefox versioning being independent for so long taught me things). Couple followup questions:
The set of people affected here is really small, especially if its already fixed in Edge so I'm just trying to figure out if it's worth taking on another line of code that really only needs to live for a month or 2 but will realistically still be there in 2022. Like you said, we have the ability to handle this thanks to other browsers so it's not a huge deal. |
Try not using |
ping @patrickkettner! no rush, but when you get a chance could you take a look at @zpao's follow up questions? Thanks 😄 |
super sorry @zpao @aweary, last update got lost in my inbox
it would be on the order of months, almost certainly less than a year that this would affect Edge users on stable builds |
Got the same issue. @Pilaas's advice works as expected, thanks! |
Seems like it was a temporary issue and so there's nothing to do on our side. |
This appears to be a bug in React with the Microsoft Edge browser. This was previously a bug in older Internet Explorer browsers as well, but appears to have been fixed by #6982 – unfortunately the fix did not resolve the issue in Edge.
I modified the codepen from the original issue to use React 15.3.0, which includes the above-referenced pull request, and demonstrates the bug in Edge:
http://codepen.io/anon/pen/QEYoLV
Here is the output of that Codepen in IE 11 – this is the expected behavior as
innerHTML
is not available in Internet Explorer, yet React 15.3 is still able to function:And here is the output of the same Codepen in Edge 38:
The problem seems to be that Edge has
innerHTML
, so it does not use the IE workaround code, yet Edge does not appear to be refreshing the DOM after updating – at least I can see the SVG contents added to the DOM using Inspect Element, but they are not visible in the browser.The text was updated successfully, but these errors were encountered: