dijit.Dialog not redisplaying in IE7 and IE8
Using Dojo verions 1.3.2. The following code is working fine in FF and Chrome, but works sporadically in IE7/8. I'm grabing a Dialog that already being displayed and just wanting to change its contents. The oDialogContents is always exactly the same, working or not. What ends up happening is the Dialog disappears but the underlay stays so a user is force开发者_运维知识库d to do a refresh to get page working again.
function showDialog(oDialogContents) {
var dialogBox = dijit.byId(DIALOG_PAGE);
dialogBox.attr("style","width: 400px;");
dialogBox.attr("content", oDialogContents);
dialogBox.show();
}
I had the same issue. I fixed it by adding this after changing content:
// new content not showing in IE7/8 unless we hide the dialog first
if( dojo.isIE !== undefined )
{
this._dialog.hide();
this._dialog.show();
}
this._dialog.layout(); // re-centre in case width changed
Basically the dijit needs to be hidden and shown again for IE users.
精彩评论