Skip to content

Commit

Permalink
fix: can not select all block when some block collapsed
Browse files Browse the repository at this point in the history
  • Loading branch information
Flrande committed Dec 20, 2024
1 parent 47bdc71 commit 8871ed9
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/affine/block-paragraph/src/paragraph-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,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 @@ -172,16 +171,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 8871ed9

Please sign in to comment.