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

Trouble with Drag-and-Drop on Mobile Devices in React (with react-konva) #801

Closed
dayoolacodes opened this issue Apr 5, 2024 · 1 comment

Comments

@dayoolacodes
Copy link

I'm encountering an issue where drag-and-drop functionality implemented with elements within a react-konva canvas in a React application works perfectly on desktop browsers but fails on mobile devices. Despite setting the draggable attribute on the elements, dragging doesn't initiate on touch events.

I have a React application that includes components for displaying icons ( elements) within a grid (IconsGrid) and on a canvas (react-konva). These icons should be draggable using the HTML5 drag-and-drop feature facilitated by react-konva. While this works flawlessly on desktop browsers, it doesn't respond to touch events on mobile devices.

More context here https://stackoverflow.com/questions/78276646/trouble-with-drag-and-drop-on-mobile-devices-in-react-with-react-konva

@lavrton
Copy link
Member

lavrton commented Apr 5, 2024

I don't think this is related to react-konva.
You may need some extra js to enable drag&drop of DOM elements on mobile. This may help: https://www.horuskol.net/blog/2020-08-15/drag-and-drop-elements-on-touch-devices/

@lavrton lavrton closed this as completed Apr 5, 2024
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