]> git.mjollnir.org Git - moodle.git/commitdiff
user selection: MDL-17073 add options to control the search in a collapsible region...
authortjhunt <tjhunt>
Tue, 4 Nov 2008 09:14:03 +0000 (09:14 +0000)
committertjhunt <tjhunt>
Tue, 4 Nov 2008 09:14:03 +0000 (09:14 +0000)
lib/javascript-static.js

index fd174eafbf56e644bb2e6e70cde7da617db44020..bdb3c2564cb85d3814a5c52e5103c5575f4acbdf 100644 (file)
@@ -625,8 +625,11 @@ function collapsible_region(id, userpref, strtooltip) {
     // 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.