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

Strange effect when dragging to an empty list

Open spyderdsn opened this issue 1 year ago • 5 comments

ezgif com-optimize

I noticed, when I have a list group and drag an item to an empty list, there is a fly back effect on the item dragged. This does not happen aways.

  1. When I drag the item slowly the issue does not occur.
  2. When both list have at least one item, the issue does not occur.

Any idea what I can do with it? Thanks

spyderdsn avatar Aug 25 '23 21:08 spyderdsn

I'm sorry, but I can't reproduce your issue. Could you provide a demo for reproduction, please?

https://github.com/Alfred-Skyblue/vue-draggable-plus/assets/55641773/66563ce8-6e7b-4c56-b3ee-1421e89a2c1e

Alfred-Skyblue avatar Aug 29 '23 01:08 Alfred-Skyblue

ezgif com-optimize ezgif com-optimize

I noticed, when I have a list group and drag an item to an empty list, there is a fly back effect on the item dragged. This does not happen aways.

  1. When I drag the item slowly the issue does not occur.
  2. When both list have at least one item, the issue does not occur.

Any idea what I can do with it? Thanks

i think the reason is on an empty list you have a 0 height section try to add a min-height of like 20px when the list is empty

moussaab-moulim avatar Dec 20 '23 06:12 moussaab-moulim

Hi, @moussaab-moulim @Alfred-Skyblue you can test my implementation in this Chrome extension. I tried to increase the height without the luck.

https://chromewebstore.google.com/detail/linkfolio-ai-personalised/pdhgolbhkdmkdeamfiikhkjopffadaea

BDW, I also experienced the issue mentioned here: https://github.com/Alfred-Skyblue/vue-draggable-plus/issues/45 When a new item is added to the list and then immediately dragged to another list or reorganised it can simply disappear.

Thanks

spyderdsn avatar Dec 20 '23 06:12 spyderdsn

can you provide a working codesandbox, i dont want to install an extension

moussaab-moulim avatar Dec 20 '23 06:12 moussaab-moulim

can you provide a working codesandbox, i don't want to install an extension

It will take me a day to isolate the code and prepare for code sandbox, it takes a minute to install the extension and is safe and you can remove it afterwards.

spyderdsn avatar Dec 20 '23 07:12 spyderdsn