mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 23:56:36 +08:00
fix(core): inlineEditor on rich-text may be null (#8131)
See https://github.com/toeverything/blocksuite/blob/3d3d9d7862ac91091688b3c491571f6333b97df7/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