Opened 10 years ago

Last modified 3 years ago

#10030 new defect

ContentPane: default to 0 padding when single child widget

Reported by: bill Owned by: bill
Priority: low Milestone: 1.15
Component: Dijit Version: 1.3.2
Keywords: Cc: Nathan Toone
Blocked By: Blocking:

Description

When a ContentPane has a single (layout widget) child there shouldn't be any padding used... the ContentPane should have no visual effect, is should just serve to defer loading.

See for example test_TabContainer.html and compare the "Inlined SubTabContainer" tab to the "SubTabcontainer from href" tab. They look they same, as they should. That's currently implemented via a style="padding: 0" in the test file, but would be better to have it be the default when there's a single child.

It's not trivial though. When an href tab is selected, first TabContainer calls ContentPane.resize() but then sometime later the href loads. The testing for single child and setting of this._contentBox needs to be delayed until the href loads.

But also, (excluding quirks mode) changing the padding on the ContentPane will change the margin-box size. That will make TabContainer unhappy. So I think ContentPane will need to remember the most recent call to resize() and then redo it, to keep the margin-box size the same as previously set by TabContainer.

Attachments (1)

noPadding.patch (7.2 KB) - added by bill 10 years ago.
partial patch but ContentPane?'s margin-box changes size

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by bill

Attachment: noPadding.patch added

partial patch but ContentPane?'s margin-box changes size

comment:1 Changed 10 years ago by Nathan Toone

Cc: Nathan Toone added

comment:2 Changed 7 years ago by bill

Priority: highlow

comment:3 Changed 4 years ago by dylan

Milestone: future1.12

Bill, any interest in cleaning this one up?

comment:4 Changed 3 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.