r1935 - trunk/ui
r1935 - trunk/ui
Author: joern.zaefferer
Date: Sat Jan 31 08:52:52 2009
New Revision: 1935
Modified:
trunk/ui/ui.accordion.js
Log:
accordion: another partial fix for #4011, fixes
tests/visual/accordion/width.html in FF, IE still buggy
Modified: trunk/ui/ui.accordion.js
==============================================================================
--- trunk/ui/ui.accordion.js (original)
+++ trunk/ui/ui.accordion.js Sat Jan 31 08:52:52 2009
@@ -398,7 +398,14 @@
percentDone,
showProps = {},
hideProps = {},
- fxAttrs = [ "height", "paddingTop", "paddingBottom" ];
+ fxAttrs = [ "height", "paddingTop", "paddingBottom" ],
+ originalWidth;
+ // fix width before calculating height of hidden element
+ if (options.toShow[0]) {
+ var s = options.toShow;
+ originalWidth = s[0].style.width;
+ s.width( parseInt(s.parent().width()) - parseInt(s.css("paddingLeft"))
- parseInt(s.css("paddingRight")) - parseInt(s.css("borderLeftWidth")) -
parseInt(s.css("borderRightWidth")) );
+ }
$.each(fxAttrs, function(i, prop) {
hideProps[prop] = 'hide';
@@ -431,8 +438,9 @@
easing: options.easing,
complete: function() {
if ( !options.autoHeight ) {
- options.toShow.css("height", "auto");
+ options.toShow.css("height", "");
}
+ options.toShow.css("width", originalWidth);
options.toShow.css({overflow: overflow});
options.complete();
}