html5sortable icon indicating copy to clipboard operation
html5sortable copied to clipboard

Drag element to anywehere in sortable

Open Daizygod opened this issue 2 years ago • 3 comments

Describe the bug I have more than one sortable, and when i drag elemnt to empty sortable, placeholder visible and work only when i move mouse in element that have very small height, i fixed it just give <ul> style min-height: 100%. It works fine when sortable is empty, but when sortable have 1 element the situation repeats, now i need move mouse to above or below element that already in list

I want that it work like when we drag first to empty (Work on all height size), can someone help me with this please? I already read 3-5 pages issues and didn`t find some like this

Untitled Diagram drawio

I`m use SortableInput from kartik (infinity height, with scroll Y)but I think it's not that important

Daizygod avatar Apr 20 '22 16:04 Daizygod

Hey, this makes sense. If you could send a PR I would love to merge it.

lukasoppermann avatar Aug 30 '22 21:08 lukasoppermann

Hey, this makes sense. If you could send a PR I would love to merge it.

idk how to write code in this ptoject sry, i`m not have big expirience with it, at the moment I only can see the problem and text to you how i solved this

Daizygod avatar Sep 02 '22 08:09 Daizygod

Thanks for the wonderful graphs @Daizygod! We also ran into this problem and traced it down to the !filter(element.children, options.items).length check at https://github.com/lukasoppermann/html5sortable/blob/master/src/html5sortable.ts#L637

@lukasoppermann can you fill me in on the importance of checking the target element is empty?

ignazkevenaar avatar Oct 26 '23 07:10 ignazkevenaar