diff --git a/src/component/base/DraftEditor.react.js b/src/component/base/DraftEditor.react.js index 84a52c2af4..33b84db7aa 100644 --- a/src/component/base/DraftEditor.react.js +++ b/src/component/base/DraftEditor.react.js @@ -57,7 +57,7 @@ const handlerMap = { }; type State = { - containerKey: number, + contentsKey: number, }; /** @@ -171,7 +171,7 @@ class DraftEditor extends React.Component { this.onDragLeave = this._onDragLeave.bind(this); // See `_restoreEditorDOM()`. - this.state = {containerKey: 0}; + this.state = {contentsKey: 0}; } /** @@ -230,7 +230,6 @@ class DraftEditor extends React.Component { {this._renderPlaceholder()}
@@ -383,13 +383,14 @@ class DraftEditor extends React.Component { /** * Used via `this.restoreEditorDOM()`. * - * Force a complete re-render of the editor based on the current EditorState. - * This is useful when we know we are going to lose control of the DOM - * state (cut command, IME) and we want to make sure that reconciliation - * occurs on a version of the DOM that is synchronized with our EditorState. + * Force a complete re-render of the DraftEditorContents based on the current + * EditorState. This is useful when we know we are going to lose control of + * the DOM state (cut command, IME) and we want to make sure that + * reconciliation occurs on a version of the DOM that is synchronized with + * our EditorState. */ _restoreEditorDOM(scrollPosition?: DraftScrollPosition): void { - this.setState({containerKey: this.state.containerKey + 1}, () => { + this.setState({contentsKey: this.state.contentsKey + 1}, () => { this._focus(scrollPosition); }); }