mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix(core): inlineEditor on rich-text may be null (#8131)
See 3d3d9d7862/packages/affine/components/src/rich-text/rich-text.ts (L348-L350)
https://github.com/toeverything/blocksuite/blob/master/packages/affine/components/src/rich-text/rich-text.ts#L36
This commit is contained in:
@@ -177,9 +177,9 @@ export class Editor extends Entity {
|
||||
});
|
||||
if (focusAt$.value === null && docTitle) {
|
||||
const title = docTitle.querySelector<
|
||||
HTMLElement & { inlineEditor: InlineEditor }
|
||||
HTMLElement & { inlineEditor: InlineEditor | null }
|
||||
>('rich-text');
|
||||
title?.inlineEditor.focusEnd();
|
||||
title?.inlineEditor?.focusEnd();
|
||||
}
|
||||
|
||||
const subscription = focusAt$
|
||||
|
||||
Reference in New Issue
Block a user