-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Undo operation on text input throws exception in IE9 #11609
Comments
Does this issue still need fixing? |
To my knowledge, yes. |
I also faced this issue. do you fix it now? |
Hey! Nope, and it looks like it's still an issue. I sent out a PR here: |
Very curious! It looks like this behavior only occurs when you use So something is happening in the ChangeEvent plugin that causes IE9 to revert text nodes when undoing.... I wonder. |
We are dropping support for IE in React 18, so this won't get a fix. |
Do you want to request a feature or report a bug?
This is a bug report. It looks like IE9 is unmounting text nodes when undoing text input operations. If the display value of the input is rendered in another component, it raises an exception because IE9 does not allow changes to
nodeValue
on unmounted text nodes.I think that's the issue, anyway. It is documented here:
https://connect.microsoft.com/IE/feedbackdetail/view/944330/invalid-argument-error-when-changing-nodevalue-of-a-text-node-removed-by-setting-innerhtml-on-an-ancestor
What is the current behavior?
What is the expected behavior?
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
This affects IE9 when using React 16. It is also an issue on master.
The issue springs up in ReactDOM.js:
https://github.com/facebook/react/blob/master/packages/react-dom/src/client/ReactDOM.js#L392-L398
I think there just needs to be a wrapper around the text node to see if it has a parent before updating. Maybe something like:
But that feels like a band-aid solution. I'm curious what is causing the text node to unmount to begin-with.
The text was updated successfully, but these errors were encountered: