Skip to content

Commit 73dd781

Browse files
authored
Adding support for containment
1 parent 2802058 commit 73dd781

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ui/widgets/dialog.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ $.widget( "ui.dialog", {
9595
open: null,
9696
resize: null,
9797
resizeStart: null,
98-
resizeStop: null
98+
resizeStop: null,
99+
containment: "document"
99100
},
100101

101102
sizeRelatedOptions: {
@@ -547,7 +548,7 @@ $.widget( "ui.dialog", {
547548
this.uiDialog.draggable( {
548549
cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
549550
handle: ".ui-dialog-titlebar",
550-
containment: "document",
551+
containment: options.containment,
551552
start: function( event, ui ) {
552553
that._addClass( $( this ), "ui-dialog-dragging" );
553554
that._blockFrames();

0 commit comments

Comments
 (0)