Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5821 closed defect (fixed)

TabContainer - Visual problem when creating tab programmatically (both FF and IE)

Reported by: guest Owned by: bill
Priority: high Milestone: 1.2
Component: Dijit Version: 1.0
Keywords: TabContainer Cc:
Blocked By: Blocking:

Description (last modified by Adam Peller)

I'm having a problem with TabContainer? when I add a new "tabs" created programmatically. I attach my test HTML page (derived from official Dojo test_TabContainer.html file). It creates an empty TabContainer? declaratively and then in dojo.addOnLoad() I create one tab programmatically.

Everything works fine except that initially when TabContainer? is displayed, the tab created programmatically is not properly resized - see attached tab-FF-1.png (FireFox?) and tab-IE-1.png (MSIE). When I slightly resize the browser's window, the tab is properly resized and fitted into TabContainer? - see attached screenshot tab-FF-2.png and tab-IE-2.png. It works almost identically in both FF 2.0.0.11 and IE 6 (both tested on Win XP).

I tested this with Dojo 1.0.2.

Attachments (5)

tab-FF-1.png (9.1 KB) - added by guest 11 years ago.
tab-FF-2.png (9.4 KB) - added by guest 11 years ago.
tab-IE-1.png (10.5 KB) - added by guest 11 years ago.
tab-IE-2.png (10.7 KB) - added by guest 11 years ago.
test_TabContainer_test.html (1.4 KB) - added by guest 11 years ago.
Test HTML page

Download all attachments as: .zip

Change History (12)

Changed 11 years ago by guest

Attachment: tab-FF-1.png added

Changed 11 years ago by guest

Attachment: tab-FF-2.png added

Changed 11 years ago by guest

Attachment: tab-IE-1.png added

Changed 11 years ago by guest

Attachment: tab-IE-2.png added

Changed 11 years ago by guest

Attachment: test_TabContainer_test.html added

Test HTML page

comment:1 Changed 11 years ago by dante

Resolution: worksforme
Status: newclosed

i've just tested this in trunk, and it works for me? adding tc.layout() in the addOnLoad after addChild(cp) fixes.

comment:2 Changed 11 years ago by bill

Milestone: 1.2
Resolution: worksforme
Status: closedreopened

OK, but shouldn't need to call layout() after addChild(). startup() on child widget should happen automatically if the parent is already started. Problem in StackContainer??

comment:3 Changed 11 years ago by Adam Peller

Description: modified (diff)
Owner: set to Adam Peller
Status: reopenednew

comment:4 Changed 11 years ago by Adam Peller

Milestone: 1.21.3

comment:5 Changed 11 years ago by bill

Milestone: 1.31.2
Owner: changed from Adam Peller to bill
Status: newassigned

comment:6 Changed 11 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [15137]) Fixes #5821, fixes #7594: programatically adding tab to empty TabContainer? fails. Problem was that we were querying size of tab strip before any tabs had been created, thus it was coming out as 0.

May also help fix part of #4502 (refs #4502).

!strict

comment:7 Changed 11 years ago by Adam Peller

(In [15138]) remove console.log from [15137] Refs #5821 !strict

Note: See TracTickets for help on using tickets.