fix focus update on toolbar block click
This commit is contained in:
parent
6443f5d808
commit
4ac63954ca
@ -500,7 +500,7 @@ export default class Editor extends Component {
|
||||
handleBlockClick = (event, type) => {
|
||||
event.preventDefault();
|
||||
let { editorState } = this.state;
|
||||
const transform = editorState.transform().focus();
|
||||
const transform = editorState.transform();
|
||||
const doc = editorState.document;
|
||||
const isList = this.hasBlock('list-item')
|
||||
|
||||
@ -538,7 +538,7 @@ export default class Editor extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
const resolvedState = transform.apply();
|
||||
const resolvedState = transform.focus().apply();
|
||||
this.ref.onChange(resolvedState);
|
||||
this.setState({ editorState: resolvedState });
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user