Skip to content

开源白板工具(SaaS),一体化白板,包含思维导图、流程图、自由画等。All in one open-source whiteboard tool with mind, flowchart, freehand and etc.

fix(text): fix focus fail issue after add text through dblclick

pubuzhixing8a046d1526f5b
diff --git a/packages/react-board/src/plugins/with-react.tsx b/packages/react-board/src/plugins/with-react.tsx
index 0783d1c..fcf4e10 100644
--- a/packages/react-board/src/plugins/with-react.tsx
+++ b/packages/react-board/src/plugins/with-react.tsx
@@ -54,7 +54,7 @@ export const withReact = (board: PlaitBoard & PlaitTextBoard) => {
if (readonly === true && newProps.readonly === false) {
setTimeout(() => {
ReactEditor.focus(currentEditor);
- }, 0);
+ }, 100);
} else if (readonly === false && newProps.readonly === true) {
ReactEditor.blur(currentEditor);
ReactEditor.deselect(currentEditor);