drag-and-drop icon indicating copy to clipboard operation
drag-and-drop copied to clipboard

Using `insert` plugin breaks grouping rules

Open Vexcited opened this issue 6 months ago • 1 comments

  • Framework: Vue.js 3.5 (Composition API)
  • I use dragAndDrop() (from @formkit/drag-and-drop/vue) since I provide my own state

With insert

plugins: [
    insert({
        insertPoint: () => {
            const div = document.createElement('div');
            div.classList.add('control-sorting-indicator');
            return div;
        },
    }),
]

https://github.com/user-attachments/assets/419afecd-d23a-4bcf-a22a-05ca8fbab3a5

As you can see, I can apparently move the elements outside of my group! It should not work this way, each category have its own dragAndDrop and we should not be able to drag between the groups.

Without insert()

https://github.com/user-attachments/assets/d429f8be-3b90-4bfe-9d3e-0b5f57f81c09

As you can see, I am NOT able to drag the elements to the other group and no error is thrown.

Vexcited avatar Jul 04 '25 07:07 Vexcited

Seems related to https://github.com/formkit/drag-and-drop/issues/149

Vexcited avatar Jul 04 '25 07:07 Vexcited