$('#aaa').draggable();
* {
margin: 0;
padding: 0;
}
#aaa {
width: 800px;
height: 800px;
position: absolute;
background: red;
}
.wrap {
height: 2000px;
position: relative;
;
}
<div class="wrap">
<div id='aaa'></div>
</div>
<link href="https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.js"></script>
when I drag the div overflow the page, the scrollbar will scroll. How do I prevent it from scrolling