JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css">
<h2>ui.draggable + ui.sortable stacking context issue</h2>
<h3>(demonstrating expected behaviour in 1.11.1)</h3>
<p>Steps to reproduce:
<ol>
<li>Pick up the Thing (draggable)</li>
<li>Drag it over the red box (sortable) - don't drop yet!</li>
<li>Drag it out of the red box to the empty space below</li>
<li>It works! Thing is still the cloned helper, so it isn't stuck to the sortable</li>
</ol>
</p>
<div class="box pickbox">
<div class="thing">
Thing
</div>
</div>
<div class="box dropbox">
</div>
CSS
.box {
height: 200px;
width: 200px;
}
.pickbox {
border: 1px solid black;
position: fixed;
left: 0;
}
.dropbox {
border: 1px solid red;
position: fixed;
left: 300px;
}
.thing {
height: 50px;
width: 50px;
border: 1px solid steelblue;
background: steelblue;
color: white;
text-align: center;
}
JavaScript
$(".dropbox").sortable({
});
$(".thing").draggable({
connectToSortable: ".dropbox",
helper: "clone"
});