fix(editor): keep multi-selection on right click

This commit is contained in:
ErSan 2026-01-27 20:43:12 +08:00
parent 2a5372ecb3
commit a3655b485a

View File

@ -427,6 +427,10 @@ export function Canvas(props: CanvasProps) {
e.stopPropagation();
if (node.locked) return;
// Right-click selection is handled by the contextmenu handler.
// Important: don't collapse a multi-selection on pointerdown.
if (e.button === 2) return;
// ctrl click: multi-select toggle
if (props.keyboard.ctrl) {
props.onToggleSelect(node.id);
@ -434,9 +438,6 @@ export function Canvas(props: CanvasProps) {
}
props.onSelectSingle(node.id);
// right click should not start move
if (e.button === 2) return;
props.onBeginMove(e);
}}
onContextMenu={(e) => openContextMenu(e, node.id)}