I'm facing a challenge with a list that can be dynamically added to and deleted from. The length of the list can vary.
My goal is to implement jQuery sortable for this list, but I want only the Customized Details to be sortable. These specific details should change color to orange when hovered over by the user.
However, whenever I try to drag and sort the Customized Details, the list collapses to zero height, hindering the sorting process.
I've spent numerous hours trying different solutions, searching on Stack Overflow and Google, but nothing has worked so far.
How can I ensure the dynamic height of the list doesn't interfere with the sorting functionality?
You can find a demonstration of the issue in this jsfiddle.
Here is the relevant snippet of HTML code where the height issue might arise (the rest of the code is available in the JSFiddle):
<div class="live_preview_contents_display1" style="background: teal; overflow: auto;">