Fix/group select (#378)

* fix(select): group selecet

* fix(selection): more robust

* refactor(selection): better group

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
This commit is contained in:
Chi Zhang
2022-09-06 18:12:27 +08:00
committed by GitHub
parent 08408bf51d
commit 4625d8463e
3 changed files with 38 additions and 3 deletions
@@ -256,6 +256,7 @@ export class SelectionManager implements VirgoSelection {
const rootBlockId = this._editor.getRootBlockId();
const rootBlock = await this._editor.getBlockById(rootBlockId);
const children = await rootBlock?.children();
if (children) {
this.setSelectedNodesIds(children.map(({ id }) => id));
// blur focused element and blur it