Vue.Draggable not working on Safari after first drag
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.
^ The second drag causes a selection instead
Is there a known workaround for this issue?
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 please check on Sortable.js repo. @owen-m1 do you have a clue on this one?
@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 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. 🤦♂
<draggable :forceFallback="true" ... worked for me, @Braunson
worked for me as well, thanks!
<draggable
:force-fallback="true"
...
>
....
</draggable>
☝️ It completely fixes the issue on Safari for me. Using 2.24.3.
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.
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!
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.