diff --git a/src/react-contenteditable.tsx b/src/react-contenteditable.tsx index 13f8a9c..c0a5b2f 100644 --- a/src/react-contenteditable.tsx +++ b/src/react-contenteditable.tsx @@ -87,8 +87,9 @@ export default class ContentEditable extends React.Component { // Perhaps React (whose VDOM gets outdated because we often prevent // rerendering) did not update the DOM. So we update it manually now. if (this.props.html !== el.innerHTML) { - el.innerHTML = this.lastHtml = this.props.html; + el.innerHTML = this.props.html; } + this.lastHtml = this.props.html; replaceCaret(el); }