Currently, the block cut process (ctrl + x) has a weakness of maintainability.
If use await in async function BlockSelection.copySelectedBlocks, cut process doesn't copy block data.
Because BlockManager.removeSelectedBlocks() is proceeded before BlockSelection.copySelectedBlocks.
This is the unstable async function usage.
Reproduction code: src/components/modules/blockSelection.ts
public async copySelectedBlocks(e: ClipboardEvent): Promise<void> {
await 1;
Please check: #1485
Currently, the block cut process (ctrl + x) has a weakness of maintainability.
If use
awaitin async functionBlockSelection.copySelectedBlocks, cut process doesn't copy block data.Because
BlockManager.removeSelectedBlocks()is proceeded beforeBlockSelection.copySelectedBlocks.This is the unstable async function usage.
Reproduction code:
src/components/modules/blockSelection.tsPlease check: #1485