diff --git a/packages/blocks/src/_common/components/rich-text/rich-text-operations.ts b/packages/blocks/src/_common/components/rich-text/rich-text-operations.ts index 7f006b7a1968..875691546f08 100644 --- a/packages/blocks/src/_common/components/rich-text/rich-text-operations.ts +++ b/packages/blocks/src/_common/components/rich-text/rich-text-operations.ts @@ -23,6 +23,7 @@ import { focusTitle, } from '../../../_common/utils/selection.js'; import type { ListBlockModel } from '../../../list-block/index.js'; +import type { Flavour } from '../../../models.js'; import type { PageBlockModel } from '../../../page-block/index.js'; import type { ExtendedModel } from '../../types.js'; @@ -861,6 +862,20 @@ function handleParagraphBlockForwardDelete( // TODO return false; } else { + const ignoreForwardDeleteFlavourList: Flavour[] = [ + 'affine:database', + 'affine:image', + 'affine:code', + 'affine:attachment', + ]; + + if ( + nextSibling && + matchFlavours(nextSibling, ignoreForwardDeleteFlavourList) + ) { + return true; + } + return ( handleParagraphOrList(page, model, nextSibling, firstChild) || handleEmbedDividerCode(nextSibling, firstChild)