fix(editor): edgeless selected block is missing in the return of getSelectedBlockCommand (#11813)

This commit is contained in:
L-Sun
2025-04-18 13:52:43 +00:00
parent 5fcf34d848
commit f16bcdbe2b
7 changed files with 46 additions and 11 deletions
@@ -0,0 +1,10 @@
import { SurfaceSelection } from '@blocksuite/std';
import type { GetSelectionCommand } from './types';
export const getSurfaceSelectionCommand: GetSelectionCommand = (ctx, next) => {
const currentSurfaceSelection = ctx.std.selection.filter(SurfaceSelection)[0];
if (!currentSurfaceSelection) return;
next({ currentSurfaceSelection });
};