If I bind the dialog to a div and maximize it, it will grow up the hole window (this is OK) but if I restore it, it will lost the containment. .dialog("widget").draggable("option","containment","#frameContent")