JSFiddle - React, Tailwind, and code Playground

by TJ VanToll

HTML

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<link href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" rel="stylesheet" />
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

<p><a href="http://bugs.jqueryui.com/ticket/4701">jQuery UI #4701</a> - <code>resizable</code> elements jump when resized in a scrolled parent contained element.  Scroll in the parent and then resize to recreate.</p>

<div id="outer">
    <div id="inner"></div>
    <div id="content"></div>
</div>

CSS

body { padding: 20px; }
p { line-height: 1.5; margin-bottom: 20px; }

#outer, #inner {
    border: 1px solid black;
}
#outer {
    width: 500px;
    height: 500px;
    overflow: scroll;
}
#inner {
    height: 200px;
    width: 200px;
    top: 50px;
    left: 50px;
}
#content {
    height: 2000px;
    width: 2000px;
}

JavaScript

$('#inner').resizable({
    containment: '#outer',
    handles: 'all'
});