fix: enable autofocus in blocksuite editor (#1844)
This commit is contained in:
@@ -33,6 +33,7 @@ const BlockSuiteEditorImpl = (props: EditorProps): ReactElement => {
|
|||||||
const blockHubRef = useRef<BlockHub | null>(null);
|
const blockHubRef = useRef<BlockHub | null>(null);
|
||||||
if (editorRef.current === null) {
|
if (editorRef.current === null) {
|
||||||
editorRef.current = new EditorContainer();
|
editorRef.current = new EditorContainer();
|
||||||
|
editorRef.current.autofocus = true;
|
||||||
globalThis.currentEditor = editorRef.current;
|
globalThis.currentEditor = editorRef.current;
|
||||||
}
|
}
|
||||||
const editor = editorRef.current;
|
const editor = editorRef.current;
|
||||||
|
|||||||
Reference in New Issue
Block a user