瀏覽代碼

fix pointer move cancelling locked element selection

zsviczian 1 年之前
父節點
當前提交
1d27ce16d8
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/components/App.tsx

+ 3 - 0
src/components/App.tsx

@@ -5954,6 +5954,9 @@ class App extends React.Component<AppProps, AppState> {
     pointerDownState: PointerDownState,
     pointerDownState: PointerDownState,
   ) {
   ) {
     return withBatchedUpdatesThrottled((event: PointerEvent) => {
     return withBatchedUpdatesThrottled((event: PointerEvent) => {
+      //To avoid pointerMove canceling the selection of locked elements on mobile
+      if(Boolean(this.state.contextMenu)) return;
+
       // We need to initialize dragOffsetXY only after we've updated
       // We need to initialize dragOffsetXY only after we've updated
       // `state.selectedElementIds` on pointerDown. Doing it here in pointerMove
       // `state.selectedElementIds` on pointerDown. Doing it here in pointerMove
       // event handler should hopefully ensure we're already working with
       // event handler should hopefully ensure we're already working with