fix: enable autofocus in blocksuite editor (#1844)

This commit is contained in:
Flrande
2023-04-07 14:28:21 +08:00
committed by GitHub
parent 7d55d0ea0b
commit 74657c2fa1

View File

@@ -33,6 +33,7 @@ const BlockSuiteEditorImpl = (props: EditorProps): ReactElement => {
const blockHubRef = useRef<BlockHub | null>(null);
if (editorRef.current === null) {
editorRef.current = new EditorContainer();
editorRef.current.autofocus = true;
globalThis.currentEditor = editorRef.current;
}
const editor = editorRef.current;