Skip to content

Commit

Permalink
fix: can not select all block when some block collapsed (#9248)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flrande committed Dec 23, 2024
1 parent c793f23 commit 43c20c4
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions blocksuite/affine/block-paragraph/src/paragraph-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand All @@ -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']);
}
}
})
);
Expand Down

0 comments on commit 43c20c4

Please sign in to comment.