Skip to content

Commit

Permalink
Don't set value if it'll be a noop
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiebits committed Jun 12, 2013
1 parent 0c6f4b3 commit d13a37c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/ReactDOMTextarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var ReactDOMTextarea = ReactCompositeComponent.createClass({
componentDidUpdate: function(prevProps, prevState, rootNode) {
var oldContent = getTextContent(prevProps);
var newContent = getTextContent(this.props);
if (oldContent !== newContent) {
if (oldContent !== newContent && rootNode.value !== newContent) {
rootNode.value = newContent;
}
}
Expand Down

0 comments on commit d13a37c

Please sign in to comment.