Skip to content

Commit

Permalink
Always update this.lastHtml (#173) (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosZaldivar committed Apr 10, 2020
1 parent fe5aa73 commit f4d81dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/react-contenteditable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ export default class ContentEditable extends React.Component<Props> {
// 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);
}

Expand Down

0 comments on commit f4d81dd

Please sign in to comment.