Merge branch 'master' into update-doc-requirement

This commit is contained in:
hhh 2018-09-27 23:54:50 +08:00 committed by GitHub
commit 4fc6cb84b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -632,8 +632,8 @@ class Wysiwyg extends React.Component {
newEditorState = EditorState.push(newEditorState, newContentState); newEditorState = EditorState.push(newEditorState, newContentState);
const updatedSelection = updateSelection(this.getSelection(), nextBlocks, 2); const updatedSelection = updateSelection(this.getSelection(), nextBlocks, 2);
this.setState({ editorState: EditorState.acceptSelection(newEditorState, updatedSelection) });
this.sendData(newEditorState); this.sendData(newEditorState);
this.setState({ editorState: EditorState.acceptSelection(newEditorState, updatedSelection) });
}) })
.catch(() => { .catch(() => {
this.setState({ editorState: EditorState.undo(this.getEditorState()) }); this.setState({ editorState: EditorState.undo(this.getEditorState()) });