]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed IAccordion layout function problems in IE6. Height now gets calculated correctly.
authorJouni Koivuviita <jouni.koivuviita@itmill.com>
Mon, 10 Mar 2008 08:07:01 +0000 (08:07 +0000)
committerJouni Koivuviita <jouni.koivuviita@itmill.com>
Mon, 10 Mar 2008 08:07:01 +0000 (08:07 +0000)
svn changeset:4008/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IAccordion.java

index 98a5606ad1e6cff9e15a8f783cd631beb30ba68e..d7372e6f56cd86f9d942935bfc3fc3c7effe067c 100644 (file)
@@ -27,6 +27,10 @@ public class IAccordion extends ITabsheetBase implements
     public IAccordion() {
         super(CLASSNAME);
         stack = new ArrayList();
+        // IE6 needs this to calculate offsetHeight correctly
+        if (Util.isIE6()) {
+            DOM.setStyleAttribute(getElement(), "zoom", "1");
+        }
     }
 
     public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
@@ -121,7 +125,7 @@ public class IAccordion extends ITabsheetBase implements
                 DOM.setStyleAttribute(w.getElement(), "visibility", "hidden");
                 DOM.setStyleAttribute(w.getElement(), "position", "absolute");
             }
-            DOM.setStyleAttribute(item.getContainerElement(), "height", "");
+            DOM.setStyleAttribute(item.getContainerElement(), "height", "0");
 
             // Calculate target height
             super.setHeight(height);
@@ -229,6 +233,10 @@ public class IAccordion extends ITabsheetBase implements
             return content;
         }
 
+        public Element getCaptionElement() {
+            return captionNode;
+        }
+
         public void onBrowserEvent(Event evt) {
             if (DOM.eventGetType(evt) == Event.ONCLICK) {
                 Element target = DOM.eventGetTarget(evt);