Opened 10 years ago

Closed 10 years ago

#9229 closed defect (fixed)

_LayoutWidget does not resize in certain contexts

Reported by: parente Owned by:
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.0
Keywords: Cc: Adam Peller
Blocked By: Blocking:

Description (last modified by bill)

The problem is in the startup() method of_LayoutWidget. If the layout widget has a parent, it does not register for resize events from the browser and assumes it will get notified about resizes from its parent container. But consider the nesting:

BorderContainer
- ContentPane (in border container center region)
-- <bunch of stuff>
-- TabContainer
-- <bunch of stuff>

In other words, assume the ContentPane is serving as the container for a whole other set of widgets loaded via href. In this case, the TabContainer sees it has a parent so it does not dojo.connect to onresize. The ContentPane, however, does not think it has a single child, so it doesn't bother to notify the TabContainer when the window resizes.

This was not a problem in Dojo 1.2.x.

Change History (3)

comment:1 Changed 10 years ago by Adam Peller

Cc: Adam Peller added

comment:2 Changed 10 years ago by bill

Description: modified (diff)

Why do you want the TabContainer to know when the window changes size?

comment:3 Changed 10 years ago by bill

Milestone: tbd1.4
Resolution: fixed
Status: newclosed

In the newest code, ContentPane calls resize() on each of it's children, so the embedded layout widgets are getting resized. See the "embedded layout widgets" tab in test_TabContainer.html, or the more complicated test in ContentPaneLayout.html.

It's true that the TabContainer in your example won't resize when the browser window is resized, but there's no reason to do that.

Note: See TracTickets for help on using tickets.