Opened 13 years ago

Closed 6 years ago

#8197 closed enhancement (patchwelcome)

ContentPane: resizes single layout child even when it shouldn't

Reported by: bill Owned by: bill
Priority: low Milestone: 1.13
Component: Dijit Version: 1.2.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

See the "Sub TabContainer from href" tab in test_TabContainer_noLayout.html.

Although the outer TabContainer and inner TabContainer are both doLayout=false, the ContentPane does a resize() on the inner TabContainer after loading the URL. Result is that we can't see all the contents of "Subtab 2".

The "problem" is that doLayout=false isn't set on the ContentPane.

Have to test if a simple ContentPane outside of a TabContainer is working correctly. (Also need to think about what the correct behavior should be, on a ContentPane with or w/out an explicit height setting, with or w/out doLayout set.)

Change History (10)

comment:1 Changed 13 years ago by bill

Description: modified (diff)
Milestone: tbd1.4
Type: defectenhancement

Seems like ContentPane should default to doLayout=false unless inside of a layout widget.

comment:2 Changed 13 years ago by bill

In [15925]: Set doLayout=false on the ContentPane so that it won't try (and fail) to resize the inner TabContainer. The inner TabContainer can't be resized since it's also doLayout=false.

comment:3 Changed 12 years ago by bill

Could also set doLayout=false (default setting) for TitlePane, Dialog, etc., as those usually size themselves according to their content (but in theory a developer could explicitly set a size on the containerNode and then expect the href-loaded contents to be sized to match.

comment:4 Changed 12 years ago by bill

(In [20099]) Various TabContainer? href-loading and children resizing fixes, centered around ContentPane?'s role as a layout widget:

  • Fix doLayout=false TabContainer? (broken by recent checkins for #5528, #9794)
  • Fix problem where resizing the TabContainer? would refresh a pane with refreshOnShow=true. It's only supposed to refresh when the pane is hidden then shown again. (fixes #8969 !strict)

Differentiated between onShow(), which indicates that the ContentPane? is being shown, and resize(), which, when the ContentPane? is in a layout widget hierarchy, occurs both when the ContentPane? is shown but also when it changes size.

It's complicated because a ContentPane? being made visible is indicated in different ways depending on the situation:

Refs #5528, #9794 !strict

Also added a bunch of tests including one for a TitlePane? with a single layout child (refs #8197).

comment:5 Changed 12 years ago by bill

Milestone: 1.41.5

comment:6 Changed 12 years ago by Adam Peller

Milestone: 1.51.6

comment:7 Changed 11 years ago by bill

Milestone: 1.6future

comment:8 Changed 9 years ago by bill

#16527 is a duplicate of this ticket.

comment:9 Changed 9 years ago by bill

Priority: highlow

comment:10 Changed 6 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.