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