Opened 13 years ago

Closed 13 years ago

#7825 closed defect (worksforme)

BorderContainer region="center" doesn't work in some cases in 1.2, but works fine in 1.1.1

Reported by: doron Owned by: Adam Peller
Priority: high Milestone: tbd
Component: Dijit Version: 1.2.0
Keywords: Cc:
Blocked By: Blocking:


Given a body tag:


<div dojoType="foo.Test" style="width: 100%; height: 100%;"></div>


And foo.Test is a dijit with a template that has a border container, the region="center" doesn't take over all the space like it used to in 1.1.1.

Testcase attached.

Attachments (1)

bug.html (1.3 KB) - added by doron 13 years ago.

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by doron

Attachment: bug.html added


comment:1 Changed 13 years ago by Adam Peller

Owner: set to Adam Peller
Priority: normalhigh

comment:2 Changed 13 years ago by Adam Peller

Hi Doron. Two things missing from your test that seem to make the difference. First, you need to include a dijit stylesheet like tundra. Among other things, it defines position:absolute on the center region, which is critical to getting the CSS sizing to work. Second, I think you need to define width/height=100% on the HTML element, as Bill does in dijit/tests/layout/test_BorderContainer_full.html. I don't know why, and I don't know why it would have worked differently in 1.1... but does that get you out of a jam?

comment:3 Changed 13 years ago by doron

Yup, that fixed it. Not sure how to close this report.

comment:4 Changed 13 years ago by Adam Peller

Resolution: worksforme
Status: newclosed

comment:5 Changed 13 years ago by zumbo

Resolution: worksforme
Status: closedreopened

Nope, it still doesn't work. dijit/tests/layout/test_BorderContainer_full.html as well as the other BorderContainer? tests show white borders around the panes (both in FF2 and IE7) which weren't there in 1.1.1. Seems to be a problem with the tundra stylesheet.

comment:6 Changed 13 years ago by Adam Peller

Resolution: worksforme
Status: reopenedclosed

that's deliberate, and unrelated to the bug reported here, I think.

There was a design decision made (and I was on the losing end of the battle) to add 'gutters' into the layout by default. If you want your layout to look like it did before, you need to add gutters="false" to your BorderContainer?. The gutters provide a more consistent look and feel when used with other Dijit containers, like TabContainer?. This should have been documented in the release notes, though it does violate our compatibility promise.

Note: See TracTickets for help on using tickets.