dillon1000/react
Commit
Browse files Correctly render placeholder for textarea in IE11 (#8020)
* Check if textContent should be set for textarea shouldSetNodeTextContent returns whether a node.textContent should be updated. Currently it only covers one case, which is to avoid setting the textContent if the text is empty and a placeholder exists. * Only set node.value if it's equal to initialValue In IE11 textContent is populated when the placeholder attribute is set. Without this check, we end up setting node.value equal to the placeholder text, causing the textarea to actually render with the text inside. This check makes sure that textContent is equal to our expected initialValue, which should be the case when using defaultValue. * Remove placeholder/textarea check, use contentToUse instead
Changed paths2 files
First-parent comparisonsrc/renderers/dom/stack/client/ReactDOMComponent.js ModifiedM src/renderers/dom/stack/client/wrappers/ReactDOMTextarea.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…