Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draggable caught errors while triggering 'drag:over' #527

Open
maxence33 opened this issue Jun 29, 2022 · 1 comment
Open

Draggable caught errors while triggering 'drag:over' #527

maxence33 opened this issue Jun 29, 2022 · 1 comment

Comments

@maxence33
Copy link

maxence33 commented Jun 29, 2022

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.

@zjffun
Copy link
Contributor

zjffun commented Jun 30, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants