holiber / sl-vue-tree

Customizable draggable tree component for Vue.js
https://holiber.github.io/sl-vue-tree/
MIT License
345 stars 78 forks source link

Shift selection causes nodes to duplicate on drag and drop #11

Open Piersen opened 6 years ago

Piersen commented 6 years ago

How to replicate the bug in the demo

https://stream-labs.github.io/sl-vue-tree/demo/index

  1. Click Folder 2, hold Shift, click Folder 5
  2. Drag and drop the selection to Folder 1
  3. Item 3, Item 4, Folder 3 and Item 5 are duplicated into their parent folder
Piersen commented 6 years ago

Update: Happens also when you select a folder and its children individually

holiber commented 6 years ago

Thanks for the report

nicknack23 commented 5 years ago

Just a bump and a clarification: @Piersen's update in post 2 is the most specific description of the bug (I think you can strike the word "also").

A simpler replication of the bug: multiselect Folder2 and Item3 and drag them to the top of the list. You'll get a duplicate of Item3.

Fuzzyma commented 4 years ago

So can you give a quick tip where I have to look in the code for the bug? I am pretty sure you have a few guesses already? :)