fix: enable autofocus in blocksuite editor (#1844)

This commit is contained in:
Flrande authored and GitHub committed 2023-04-07 06:28:21 +00:00
1 parent 7d55d0ea0b
commit 74657c2fa1
1 file changed
+1
@@ -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;