dojo non-modal dialog

Vu Dang picture Vu Dang · Aug 30, 2011 · Viewed 8.1k times · Source

Is there a way to create a non-modal dialog window using dojo? jQuery UI supports both modal and non-modal dialog boxes. I am trying to convert a SilverLight application to HTML/javascript and finding it difficult to create non-modal windows using dojo.

Answer

Roy J picture Roy J · May 9, 2012

You can set the display of the underlay to 'none', and you will have a non-modal Dialog. To do that, set the class of the Dialog to 'nonModal' (that's just a convention I'm creating right now), and in the CSS for the page, have an entry for .nonModal_underlay.

require(['dijit/form/Button','dijit/Dialog'],
  function (Button, Dialog) {
    var d = new Dialog({
                    'title':'I am nonmodal',
                    'class':'nonModal'
                  });
  });

.nonModal_underlay {
    display:none;
}