Shopify/draggable

Draggable caught errors while triggering 'drag:over'

maxence33 opened this issue · 1 comments

NPM Beta 12 built with esbuild

I am using swapAnimation from Plugins and I have an error on the below :

const sortable = new Sortable(document.querySelector('#experience_list'), {
    draggable: 'turbo-frame', 
    swapAnimation: {
    duration: 200,
    easingFunction: 'ease-in-out'
  },
  plugins: [Plugins.SwapAnimation]
});

which is :

Draggable caught errors while triggering 'drag:over'
Array [ DOMException ]​
0: DOMException: Node.insertBefore: Child to insert before is not a child of this node​
length: 1​
: Array []

Basically the sortage works but there is no animation.
With <ul> and <li> the animation work perfectly.
I tried to use a class instead of turbo-frame tag and the error disappears yet the animation still doesn't work.

Is there an easy fix or something I didn't do right.

You can try Plugins.SortAnimation. It is more suitable for this scene.