fix(editor): ime input error at empty line (#11636)

Close [BS-3106](https://linear.app/affine-design/issue/BS-3106/mac-chrom在空行使用ime输入,文档卡住)
This commit is contained in:
L-Sun
2025-04-11 10:39:16 +00:00
parent e1e5e8fc14
commit aabb09b31f
22 changed files with 148 additions and 110 deletions

View File

@@ -5,7 +5,7 @@ import { effects } from '@blocksuite/affine/std/effects';
import {
type AttributeRenderer,
InlineEditor,
ZERO_WIDTH_NON_JOINER,
ZERO_WIDTH_FOR_EMBED_NODE,
} from '@blocksuite/affine/std/inline';
import {
type BaseTextAttributes,
@@ -62,7 +62,7 @@ const attributeRenderer: AttributeRenderer = ({ delta, selected }) => {
border: selected ? '1px solid #eb763a' : '',
background: 'rgba(135,131,120,0.15)',
})}
>@flrande<v-text .str=${ZERO_WIDTH_NON_JOINER}></v-text
>@flrande<v-text .str=${ZERO_WIDTH_FOR_EMBED_NODE}></v-text
></span>`;
}