Browse Source

fix dragging on mobile

Ryan Di 3 weeks ago
parent
commit
ba3dde361b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/excalidraw/components/App.tsx

+ 3 - 1
packages/excalidraw/components/App.tsx

@@ -8446,9 +8446,11 @@ class App extends React.Component<AppProps, AppState> {
 
         // prevent immediate dragging during lasso selection to avoid element displacement
         // only allow dragging if we're not in the middle of lasso selection
+        // (on mobile, allow dragging if we hit an element)
         if (
           this.state.activeTool.type === "lasso" &&
-          this.lassoTrail.hasCurrentTrail
+          this.lassoTrail.hasCurrentTrail &&
+          !(this.isMobileOrTablet() && pointerDownState.hit.element)
         ) {
           return;
         }