fix(editor): do not display format bar with embed node (#11371)

Close [BS-2895: 点击inline名字区域不需要显示format toolbar](https://linear.app/affine-design/issue/BS-2895/点击inline名字区域不需要显示format-toolbar)
This commit is contained in:
Flrande
2025-04-02 09:21:32 +00:00
parent 6d1fe37e4c
commit 51b3f2b057
2 changed files with 37 additions and 4 deletions
+16
View File
@@ -19,6 +19,7 @@ import {
initThreeParagraphs,
pasteByKeyboard,
pressArrowDown,
pressArrowLeft,
pressArrowUp,
pressEnter,
pressEscape,
@@ -1051,3 +1052,18 @@ test.describe('more menu button', () => {
await assertRichTexts(page, ['123', '789']);
});
});
test('should not display format bar when just select embed node', async ({
page,
}) => {
await enterPlaygroundRoom(page);
await initEmptyParagraphState(page);
await focusRichText(page, 0);
await type(page, '@\n');
await assertRichTextInlineRange(page, 0, 1, 0);
await pressArrowLeft(page);
await assertRichTextInlineRange(page, 0, 0, 1);
const { boldBtn } = getFormatBar(page);
await expect(boldBtn).toBeHidden();
});