SteveEisner
11-03-2006, 08:28 PM
Noticed that when I have class="ylayout-inactive-content" on the div that will become a dialog, and that dialog is modal, then dragging it causes it to disappear. The shadow stays behind.
<div id="edit-dlg" >
<div class="ydlg-hd">Title</div>
<div class="ydlg-bd">
...
</div>
<div class="ydlg-ft">
</div>
</div>
showDialog: function() {
if(!dialog){ // lazy initialize the dialog and only create it once
dialog = new YAHOO.ext.BasicDialog("edit-dlg", {
modal:true,
width:600,
height:150,
shadow:true,
minWidth:500,
minHeight:150
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Save', dialog.hide, dialog);
dialog.addButton('Cancel', dialog.hide, dialog);
}
dialog.show(getEl('addContactButton').dom);
}
Is there a better way to start the dialog initially hidden?
<div id="edit-dlg" >
<div class="ydlg-hd">Title</div>
<div class="ydlg-bd">
...
</div>
<div class="ydlg-ft">
</div>
</div>
showDialog: function() {
if(!dialog){ // lazy initialize the dialog and only create it once
dialog = new YAHOO.ext.BasicDialog("edit-dlg", {
modal:true,
width:600,
height:150,
shadow:true,
minWidth:500,
minHeight:150
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Save', dialog.hide, dialog);
dialog.addButton('Cancel', dialog.hide, dialog);
}
dialog.show(getEl('addContactButton').dom);
}
Is there a better way to start the dialog initially hidden?