vue-draggable icon indicating copy to clipboard operation
vue-draggable copied to clipboard

DOMExceptions with Dropzones

Open EndenDragon opened this issue 6 years ago • 2 comments

Describe the bug I am encountering errors when dragging and dropping nested list. The issue only arises when showDropzoneAreas is enabled.

My element looks something like

<ul id="scoresheet-editor">
      <item :model="criteria" v-drag-and-drop:options="draggableOptions"></item>
</ul>

Where <item> is essentially a <li> with lots of other child elements inside... including a single <ul> which would contain more of .

<li>
    <ul>
        <item> <!-- more <item> -->
    </ul>
</li>

Expected behavior I expect there would not be an error when performing dropping action.

Screenshots image

Desktop (please complete the following information):

  • OS: Mac OS 10.13
  • Browser Chrome 76

Additional context Add any other context about the problem here.

EndenDragon avatar Sep 16 '19 05:09 EndenDragon

Hi @EndenDragon ,

Thanks for the feedback.

I'll try to reproduce this. In the meantime move v-drag-and-drop:options="draggableOptions" directive to the child component Item.

Thanks

nikolasp avatar Sep 16 '19 06:09 nikolasp

Hi @nikolasp , Thanks for the response. I moved it into the item and the error still persists. The only difference is that it doesn't handle reordering anymore. I am able to drag and the dropzones can be shown. However when dropped, nothing happens and the order of elements stays the same. I am using the same options as previous.

draggableOptions: {
                    dropzoneSelector: 'ul',
                    draggableSelector: 'li',
                    multipleDropzonesItemsDraggingEnabled: true,
                    reactivityEnabled: false,
                    onDrop: function (e) {
                    },
                }

EndenDragon avatar Sep 16 '19 18:09 EndenDragon