Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#18253 closed defect (fixed)

[regression] Dialog: requires titleBar

Reported by: floerke Owned by: bill
Priority: undecided Milestone: 1.10.4
Component: Dijit Version: 1.10.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Since version 1.10 the dijit.Dialog requires this.titleBar to be not null.

The new resize-method of dijit.Dialog fails in Firefox, if there is no titleBar (for example in the derived dojox.image.LightboxDialog?).

The titleBar is treated as an optional element in _setup-method (version 1.10) and in in general before 1.10:

if(this.titleBar && this.draggable)
...

But the resize-method states:

array.forEach([this.domNode, this.containerNode, this.titleBar], 
  function(node)  {
    domStyle.set(node, {
      position: "static",
      width: "auto",
      height: "auto"
    });
  }
);

and

utils.layoutChildren(this.domNode, contentDim,[Node: this.titleBar, region: "top"}, centerSize ]);

which fails, if this.titleBar is null.

The two calls can be fixed as

array.forEach([this.domNode, this.containerNode, this.titleBar], function(node){
  if (node){
    domStyle.set(node, {
      position: "static",
      width: "auto",
      height: "auto"
    });
  }
});

and

if (this.titleBar){
  utils.layoutChildren(this.domNode, contentDim,
    [ {domNode: this.titleBar, region: "top"}, centerSize ]);
}

Change History (7)

comment:1 Changed 5 years ago by Yasir Assam

This is easy to reproduce using the one of the test files:

  • Open dojox/image/tests/test_Lightbox.html in your browser
  • Bring up a lightbox image, e.g. click on "tall", or "4:3 image"
  • Slowly resize window by gradually making it smaller
  • As soon as the window gets too small for the lightbox widget the lightbox widget disappears and you get a bunch of JS errors in the console.

comment:2 Changed 5 years ago by dylan

Milestone: tbd1.11
Owner: set to bill
Status: newassigned

comment:3 Changed 5 years ago by bill

Milestone: 1.111.10.4

comment:4 Changed 5 years ago by bill

Description: modified (diff)

comment:5 Changed 5 years ago by bill

Summary: dijit.Dialog requires titleBar[regression] Dialog: requires titleBar

comment:6 Changed 5 years ago by Bill Keese <bill@…>

Resolution: fixed
Status: assignedclosed

In 7fb5165e195a0c3698bd6cde7d93cfa4d5ea5066/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:7 Changed 5 years ago by Bill Keese <bill@…>

In e1c476f1dc3ca67d9d9029bf46c09900283d19e0/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.