fix: can not select all block when some block collapsed (#9248)

This commit is contained in:
Flrande
2024-12-23 09:09:53 +00:00
parent c793f2307b
commit 43c20c4e05

View File

@@ -160,7 +160,6 @@ export class ParagraphBlockComponent extends CaptionedBlockComponent<
if (this.model.type.startsWith('h') && collapsed) {
const collapsedSiblings = this.collapsedSiblings;
const textSelection = this.host.selection.find('text');
const blockSelections = this.host.selection.filter('block');
if (
textSelection &&
@@ -170,16 +169,6 @@ export class ParagraphBlockComponent extends CaptionedBlockComponent<
) {
this.host.selection.clear(['text']);
}
if (
blockSelections.some(selection =>
collapsedSiblings.some(
sibling => sibling.id === selection.blockId
)
)
) {
this.host.selection.clear(['block']);
}
}
})
);