Skip to content
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

Issue with dangerouslySetInnerHTML and markup rehydration #11228

Closed
smashercosmo opened this issue Oct 14, 2017 · 3 comments
Closed

Issue with dangerouslySetInnerHTML and markup rehydration #11228

smashercosmo opened this issue Oct 14, 2017 · 3 comments

Comments

@smashercosmo
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When trying to rehydrate markup in IE11 'Argument is not optional' error is thrown. It happens only if component has dangerouslySetInnerHTML prop.

Example
https://jsfiddle.net/oy9awLtq/

What is the expected behavior?
No error should be thrown

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React version: 16
Browser: IE11

@nhunzaker
Copy link
Contributor

Confirmed. The offending code:

var normalizeHTML = function (parent, html) {
  if (!testDocument) {
    testDocument = document.implementation.createHTMLDocument();
  }
  // ...
}

This is a duplicate of #10865, and was fixed in #10921.

In any case, thank you for filing and providing a reproduction case!

@smashercosmo
Copy link
Author

Awesome. Thx.

@gaearon
Copy link
Collaborator

gaearon commented Nov 3, 2017

React 16.1.0-beta has been released. Please update react, react-dom, and react-test-renderer (if you use it) to this version and let us know if it solved the issue! We’d appreciate if you could test before Monday when we plan to get 16.1.0 out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants