Currently the ghost is cloned from the dragged item, and the original is left in place with visibility:hidden applied. The ghost is then appended to the container.
There are a few issues with this that I've come across:
Jank when ghost is cloned from an element with a lot of child nodes. Honestly, not sure how much not cloning and using original would improve this.
Cloned ghost does not respect the scroll position of nested content. In these situations the drag becomes a bit jarring to look at.
Having the ghost inserted into the container as the last element makes for more annoying CSS selectors, since you can no longer use :last-child.
A look at how Trello handles it... they leave behind a simple div placeholder and move the original item out of the container into an upper level body div.
Currently the ghost is cloned from the dragged item, and the original is left in place with visibility:hidden applied. The ghost is then appended to the container.
There are a few issues with this that I've come across:
A look at how Trello handles it... they leave behind a simple div placeholder and move the original item out of the container into an upper level body div.