xyflow / xyflow

React Flow | Svelte Flow - Powerful open source libraries for building node-based UIs with React (https://reactflow.dev) or Svelte (https://svelteflow.dev). Ready out-of-the-box and infinitely customizable.
https://xyflow.com
MIT License
21.29k stars 1.41k forks source link

`selectionOnDrag` does not work on touch devices #4199

Open bilogic opened 1 week ago

bilogic commented 1 week ago

Describe the Bug

selectionOnDrag
selectionMode={SelectionMode.Partial}
panOnDrag={false}

I added above to get the behavior I want, but on a touch device, selection does not work.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Load on touch device https://codesandbox.io/p/sandbox/figma-controls-vyvrvp?file=%2Fsrc%2FFlow.tsx
  2. Cannot select

Expected behavior

I expected the blue selection box to appear as I touch my device screen

Screenshots or Videos

No response

Platform

Additional context

No response

bilogic commented 1 week ago

This version also did not work

$ npm list reactflow-roadmap@0.0.0 /project ├── dagre@0.8.5 ├── elkjs@0.9.3 ├── react-dom@18.2.0 ├── react@18.2.0 ├── reactflow@11.11.2 └── vite@5.2.10

bilogic commented 1 week ago

Can selectionOnDrag be dynamically toggled with a UI? I want it to behave differently on touch devices vs desktops.