Vue.Draggable icon indicating copy to clipboard operation
Vue.Draggable copied to clipboard

Vue.Draggable not working on Safari after first drag

Open James-Z-Tang opened this issue 7 years ago • 12 comments

On Safari tried the demo https://github.com/David-Desmaisons/draggable-example and found that the first dnd works but followings no. However if you click anywhere on the page you can dnd again for once.

James-Z-Tang avatar Oct 11 '19 20:10 James-Z-Tang

^ The second drag causes a selection instead

PolarizedIons avatar Nov 26 '19 07:11 PolarizedIons

Is there a known workaround for this issue?

anlaital avatar Nov 28 '19 10:11 anlaital

Does anyone have a workaround for this? We need this to work on safari the first time you drag as explained first comment. HELP

EttoreRaimondi avatar Nov 29 '19 13:11 EttoreRaimondi

@EttoreRaimondi please check on Sortable.js repo. @owen-m1 do you have a clue on this one?

David-Desmaisons avatar Nov 29 '19 14:11 David-Desmaisons

@David-Desmaisons I was told that Safari 13 has a bug in it's drag and drop API that is causing this. For now you will need to do forceFallback: true in the options.

owen-m1 avatar Dec 02 '19 02:12 owen-m1

@owen-m1 How do I add this as an option to Vue.Draggable, seems regardless of what the docs say, it never get's applied.

Edit: I found the issue, a package that uses Vue.Draggable or rather SortableJS pointed me here but doesn't accept the forceFallback parameter directly. 🤦‍♂

Braunson avatar Dec 05 '19 02:12 Braunson

<draggable :forceFallback="true" ... worked for me, @Braunson

PolarizedIons avatar Dec 05 '19 07:12 PolarizedIons

worked for me as well, thanks!

reppair avatar Dec 18 '19 12:12 reppair

 <draggable
   :force-fallback="true"
    ...
 >
    ....
</draggable>

☝️ It completely fixes the issue on Safari for me. Using 2.24.3.

lucianokrebs avatar Mar 22 '22 13:03 lucianokrebs

This is working when started dragging but all of other events for another elements (dragenter, dragover, dragleave, drop) does not working for me when :force-fallback="true" applied.

szotyi41 avatar Apr 04 '22 14:04 szotyi41

Just add this to your package.json and do npm install: "overrides": { "vuedraggable": { "sortablejs": "1.14.0" } } It will override sortablejs dependency version for vuedraggable. Fixed the problem for me!

Startvy avatar Feb 08 '24 16:02 Startvy

A strange behavior that is worth to mention:

You should use <draggable :forceFallback="true"> instead of <draggable forceFallback>. This is a rare case that these two style of boolean attribute are not identical.

lukeupup avatar Oct 10 '25 09:10 lukeupup