Login Register

There is a bug in dojox.widget.Dialog

It fails even in this simple case.

initialize = function(){
  var button = dijit.byId("button");
  var dialog = dijit.byId("dialog");

  dojo.connect(button, "onClick", null, function(){
    dialog.setContent("hello a");
    dialog.show();
  });
}
dojo.addOnLoad(initialize);

The cause of this bug is so simple.

When dijit.layout.ContentPane.setContent is over. dijit.Dialog.onload called dojox.widget.Dialog._position, then, there is a code like this will be called, XXX = this._size.w = XXX;.

But at that time, the _size of the dialog object is null. So an undefined exception will be thrown.

I think call the _setSize at the beginning of dojox.widget.Dialog._position will be a good solution. :)

Thank you.

Could you file a bug on that

Could you file a bug on that in the trac?

Sure

I'll do that. :)