dragon-drop icon indicating copy to clipboard operation
dragon-drop copied to clipboard

Dragging with touch also scrolls the page, making it impossible to drag accurately

Open WestonThayer opened this issue 5 years ago • 3 comments

untitled

  1. On a touch device, touch down on a draggable item on the demo page
  2. Drag your finger up or down

Actual: page is scrolled Expected: page remains fixed, only item moves


Adding overflow-y: hidden while dragging to <body> will fix this, but stopping event bubbling might be a better fix.

WestonThayer avatar Feb 12 '19 17:02 WestonThayer

Ah, looks like dragula also has this issue, assuming that's the root cause.

WestonThayer avatar Feb 12 '19 18:02 WestonThayer

https://github.com/bevacqua/dragula/issues/426

WestonThayer avatar Feb 12 '19 18:02 WestonThayer

Adding some UX notes. On iOS:

  • For list items with a drag handle, the item is grabbed immediately upon touchstart of the handle
  • For list items without a drag handle, there's ~1s press-and-hold delay before the item is grabbed (otherwise it would be difficult to scroll the page)

WestonThayer avatar Feb 12 '19 18:02 WestonThayer