From 43c20c4e05d43265611dc176f03bf29fa88a10b4 Mon Sep 17 00:00:00 2001 From: Flrande <1978616327@qq.com> Date: Mon, 23 Dec 2024 09:09:53 +0000 Subject: [PATCH] fix: can not select all block when some block collapsed (#9248) --- .../affine/block-paragraph/src/paragraph-block.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/blocksuite/affine/block-paragraph/src/paragraph-block.ts b/blocksuite/affine/block-paragraph/src/paragraph-block.ts index 169ca49b03..67c9524e5a 100644 --- a/blocksuite/affine/block-paragraph/src/paragraph-block.ts +++ b/blocksuite/affine/block-paragraph/src/paragraph-block.ts @@ -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']); - } } }) );