rcdexta / react-trello

Pluggable components to add a kanban board to your application
https://rcdexta.com/react-trello/
MIT License
2.19k stars 482 forks source link

Drag and drop doesn't work well in iOS devices #336

Open johhansantana opened 4 years ago

johhansantana commented 4 years ago

Describe the bug Dragging and dropping in iOS devices is clunky at best and doesn't work as expected.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://rcdexta.github.io/react-trello/ in an iOS device
  2. Try drag and drop

Expected behavior It should work normally like on web or android devices

Current behavior It grabs the card but when swiping left or right it scrolls the wrong way unless you long-press a text when grabbing

Screenshots No screenshots but got a video: https://photos.app.goo.gl/4pmA2n2JESAANkwY6

akzarma commented 4 years ago

any update to this issue? I'm also facing a similar problem on specific iOS mobile devices.

derUli commented 4 years ago

We are also affected by this issue. However I noticed that dragging cards seems to work a bit better in Cordova (a framework to build a mobile app from a web app) than in the Safari browser. If nobody has a fix for this issue then we have to fork it, and fix it by ourself, since our customers will not accept buggy drag and drop on Apple devices.

coulson84 commented 4 years ago

@derUli did you fork and find a fix for this issue? We've just come up against the same problem so will need to try to fix and submit a PR. Haven't started on it yet so if you've found a solution it would be great if you could give me a head start :D

derUli commented 4 years ago

I have a version where the Dragging of Cards is fixed on iOS devices but the horizontal scrolling when the user touches a card short doesn't work. If the user touches the screen outside of the lanes then scrolling works.

I had to stop the work on this issue since I had other things to do in my job.

The bug cause is in "trello-smooth-dnd" which is a fork of "react-smooth-dnd". If anyone is interested in continue my work in progress fix here are my repositories

The official example project but using my fork of smooth-dnd: https://github.com/derUli/react-trello-example My fork of the buggy library: https://github.com/derUli/smooth-dnd

Fork of react-trello to replace smooth-dnd with my fork: https://github.com/derUli/react-trello

If you want to fire up the example just run the restart.sh script. It fetches and builds the latest commit of my fork. Then open the page with the iOS simulator or a physical iOS device.