Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix: alt + ctrl lasso selected elements not always kept (#9522)

Ryan Di4ca5f53b1f74
diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx
index 1fc19ac14a..b0c43359b5 100644
--- a/packages/excalidraw/components/App.tsx
+++ b/packages/excalidraw/components/App.tsx
@@ -9528,7 +9528,10 @@ class App extends React.Component<AppProps, AppState> {
// if we're editing a line, pointerup shouldn't switch selection if
// box selected
(!this.state.editingLinearElement ||
- !pointerDownState.boxSelection.hasOccurred)
+ !pointerDownState.boxSelection.hasOccurred) &&
+ // hitElement can be set when alt + ctrl to toggle lasso and we will
+ // just respect the selected elements from lasso instead
+ this.state.activeTool.type !== "lasso"
) {
// when inside line editor, shift selects points instead
if (childEvent.shiftKey && !this.state.editingLinearElement) {