// Get to the right initial state.
if (this.div.className.match(/\bcollapsed\b/)) {
this.collapsed = true;
- var region = YAHOO.util.Region.getRegion(this.caption);
- this.div.style.height = (region.bottom - region.top + 3) + 'px';
+ var self = this;
+ setTimeout(function() {
+ var region = YAHOO.util.Region.getRegion(self.caption);
+ self.div.style.height = (region.bottom - region.top + 3) + 'px';
+ }, 10);
}
// Add the appropriate image.