I want to create a kendo ui window (KUI) widget that belongs within a container only. After searching around, it seems that the widget is not supported that way. So I try to mimic as close as I could by assigning position: relative; overflow: auto;
to the container and here come the problem.
When I try to re-size the KUI, it's border does not align with the mouse position. It seems to be the margin between the container and the window viewport (20px in the snippet below).
My question is how can I make the margin go away or is there another approach to this.
$(function() {
$("#myKendoUiWindow").kendoWindow({
title: "myTitle",
appendTo: "#container"
});
});
#container {
margin: 20px;
border: 1px solid #CCC;
width: 300px;
height: 300px;
overflow: auto;
position: relative;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.1.112/js/kendo.ui.core.min.js"></script>
<link href="http://kendo.cdn.telerik.com/2016.1.112/styles/kendo.default.min.css" rel="stylesheet" />
<link href="http://kendo.cdn.telerik.com/2016.1.112/styles/kendo.common.min.css" rel="stylesheet" />
<div id="container">
<div id="myKendoUiWindow"></div>
</div>
Since this issue/limitation is a known one but isn't planed to be solved yet (thanks Lyubomir for the info), I think using jquery ui draggable, resizable is best work around for now.