Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selectionOnDrag does not work on touch devices #4199

Open
bilogic opened this issue Apr 23, 2024 · 4 comments
Open

selectionOnDrag does not work on touch devices #4199

bilogic opened this issue Apr 23, 2024 · 4 comments

Comments

@bilogic
Copy link

bilogic commented Apr 23, 2024

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

  • OS: Windows
  • Browser: Chrome
    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.4.0-next.1
    └── vite@5.2.10

Additional context

No response

@bilogic
Copy link
Author

bilogic commented Apr 23, 2024

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
Copy link
Author

bilogic commented Apr 24, 2024

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

@moklick
Copy link
Member

moklick commented May 7, 2024

It can be toggled, but it doesn't work on touch devices. We will check how we can fix it.

@bilogic
Copy link
Author

bilogic commented May 7, 2024

Yea, I managed to toggle it myself, but would be nice if toggle was built-in since selectionDrag can't work on all devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants