JSFiddle - React, Tailwind, and code Playground
HTML
<div class="wnd"></div>
<button id="btn">click me</button>
CSS
.wnd {background:yellow;height:900px;width:300px;}
JavaScript
$(function(){
var overlayCreate = $.ui.dialog.overlay.create;
// overlay create function wrapper
$.extend($.ui.dialog.overlay, {
create: function (dialog) {
// save reference to return later
var $el = overlayCreate.call(this, dialog);
// allow scrolling by dragging the scrollbar
setTimeout(function() {
$(document).off('mousedown.dialog-overlay');
}, 1);
// return original element
return $el;
}
});
var dialogOptions = {
autoOpen: false,
modal: true,
width: 400,
height: 1000
};
$(".wnd").dialog(dialogOptions);
$("#btn").click(function(){ $(".wnd").dialog("open"); });
});