| CODENOTIFIER | HelpYou are not signed inSign in |
Project: dojo
Revision: 15137
Author: bill
Date: 05 Sep 2008 00:05:46
Diff at Trac: http://trac.dojotoolkit.org/changeset/15137
Changes: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
Files:| ... | ...@@ -98,11 +98,12 @@ | |
| 98 | 98 | this.inherited(arguments); |
| 99 | 99 | |
| 100 | 100 | if(this._started){ |
| 101 | dojo.publish(this.id+"-addChild", [child, insertIndex]); | |
| 102 | ||
| 101 | 103 | // in case the tab titles have overflowed from one line to two lines |
| 104 | // (or, if this if first child, from zero lines to one line) | |
| 102 | 105 | this.layout(); |
| 103 | 106 | |
| 104 | dojo.publish(this.id+"-addChild", [child, insertIndex]); | |
| 105 | ||
| 106 | 107 | // if this is the first child, then select it |
| 107 | 108 | if(!this.selectedChildWidget){ |
| 108 | 109 | this.selectChild(child); |
| ... | ...@@ -128,6 +129,7 @@ | |
| 128 | 129 | } |
| 129 | 130 | |
| 130 | 131 | if(this.selectedChildWidget === page){ |
| 132 | console.log("deleting selected child widget"); | |
| 131 | 133 | this.selectedChildWidget = undefined; |
| 132 | 134 | if(this._started){ |
| 133 | 135 | var children = this.getChildren(); |