0

My code in React with onDrag events works well in desktop, but in mobile versions it doesn't. I don't know if is necessary another option in mobile

This is the code I'm trying (using Chrome devtools for drag&drop as mobile)

const Board = () => {
  const onDragHandler = e => {
    console.log('This is dragging')
  }
  
  return (
    <div>
      <div
        draggable
        className="box"
        onDragStart={onDragHandler}
      ></div>
    </div>
  )
}
  • Looks to be related to https://stackoverflow.com/questions/27837500/drag-and-drop-with-touch-support-for-react-js. I've run into the same issue and it looks like using https://github.com/atlassian/react-beautiful-dnd is the best option here – Evgeny Urubkov May 31 '22 at 10:53

0 Answers0