Reputation: 21
I'm using jQuery dialog and have problems dragging the dialog partially outside of the viewport.
The demo for the Draggable does exactly what I want: http://jqueryui.com/demos/draggable/default.html
But the demo for the Dialog doesn't allow the dialog to be moved partially outside of the viewport: http://jqueryui.com/demos/dialog/default.html
How to make the Dialog to allow dragging partially off the viewport?
Upvotes: 2
Views: 602
Reputation: 176
You can extend the jQuery UI dialog box by changing the containment. The default value is 'document'.
$.ui.dialog.prototype._makeDraggable = function () {
this.uiDialog.draggable({
containment: false
});
};
Upvotes: 2