mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: can not select all block when some block collapsed (#9248)
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user