fix: text disappearing on edit (#8558) (#8624)

This commit is contained in:
Mathis Beauville 2024-10-17 13:11:48 +02:00 committed by GitHub
parent 47ee8a0094
commit 21815fb930
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4737,10 +4737,13 @@ class App extends React.Component<AppProps, AppState> {
this.store.shouldCaptureIncrement(); this.store.shouldCaptureIncrement();
} }
this.setState({ flushSync(() => {
newElement: null, this.setState({
editingTextElement: null, newElement: null,
editingTextElement: null,
});
}); });
if (this.state.activeTool.locked) { if (this.state.activeTool.locked) {
setCursorForShape(this.interactiveCanvas, this.state); setCursorForShape(this.interactiveCanvas, this.state);
} }