How Can I Enable Use Of Background Elements When The Dialog Is Appeared?
I created a dojo dialog using the example . I work with maps in background. The problem is that when the dialog is appeared, the background is blocked and i can't use the map(the d
Solution 1:
You can do it with a little hack :
require(["dijit/Dialog", "dijit/DialogUnderlay", "dojo/domReady!"], function(Dialog, DialogUnderlay){
//just for the snippets to get the right stylingdocument.body.className = "tundra";
myDialog = newDialog({
title: "My Dialog",
content: "Test content.",
style: "width: 300px"
});
myDialog2 = newDialog({
title: "My Dialog",
content: "Test content.",
style: "width: 300px"
});
showDialog2 = function () {
myDialog2.show().then(function() {
DialogUnderlay.hide()
//little hack to avoid JS error when closing the dialogDialogUnderlay._singleton.bgIframe = {destroy: function() {}}
});
}
});
<scriptsrc="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js"></script><linkrel="stylesheet"type="text/css"href="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/resources/dojo.css"><linkrel="stylesheet"type="text/css"href="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dijit/themes/tundra/tundra.css"><buttononclick="myDialog.show();">show with underlay</button><buttononclick="showDialog2();">show without underlay</button>
Post a Comment for "How Can I Enable Use Of Background Elements When The Dialog Is Appeared?"