draggable icon indicating copy to clipboard operation
draggable copied to clipboard

Duplicate Mirror gets created on iOS Safari if the draggable element contains a link

Open samuelraub opened this issue 1 year ago • 1 comments

1. Apply either the bug or feature-request label

Couldn't apply a Label

2. Describe the Bug

On iOS Safari (I tested with 17.2.1) a duplicate mirror is created if you press and hold a draggable that contains a link long enough. This causes chaotic behaviour.

3. Please provide the steps to reproduce and if possible a minimal demo of the problem

  1. Open https://codepen.io/samuelraub/pen/eYXjQPL on an iPhone using Safari
  2. Tap and hold one of the list items for ~1sec
  3. Now try dragging the item

4. Please tell us about your environment:

  • Library version: 1.1.3
  • Browsers: iOS Safari 17.2.1
  • Tech stack: all
  • Other information: I included a rather hacky fix in the codepen.

samuelraub avatar Feb 09 '24 13:02 samuelraub

SortAnimation creates mirror event, have to destroy it. Already created by Sortable. See code below.

let mirror = false;

sortable.on("mirror:create", (e) => { if (mirror) { e.cancel(); return; } mirror = true; });

sortable.on("mirror:destroy", () => { mirror = false })

bryan844 avatar Nov 02 '25 12:11 bryan844