JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css">
<h2>ui.draggable + ui.sortable stacking context issue</h2>
<h3>(demonstrating regression in 1.11.2)</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>You can't! Cloned helper is removed, and the draggable item is now stuck inside the sortable container</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"
});