解决方法
您可以定位对话框并对其应用包含.试试这个:
@H_502_6@var container = $('.dialog-container'),dialog = $('.ui-dialog');
// get container top left corner locations
var cx1 = container.offset().left,cy1 = container.offset().top;
// get dialog size
var dw = dialog.outerWidth(),dh = dialog.outerHeight();
// get container bottom right location,then subtract the dialog size
var cx2 = container.width() + cx1 - dw,cy2 = container.height() + cy1 - dh;
dialog.draggable( "option","containment",[cx1,cy1,cx2,cy2] );
编辑:我为你设置了@L_502_1@.Edit2:更改为使用对话框outerWidth& outerHeight