]> source.dussan.org Git - vaadin-framework.git/commitdiff
#1345, #1444 Caption size sometimes broken in IE6 too.
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 26 Feb 2008 07:13:43 +0000 (07:13 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 26 Feb 2008 07:13:43 +0000 (07:13 +0000)
svn changeset:3922/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/Caption.java

index 36de42b33845a00cc05861f0d843afe9c1c37f35..e92fb7ba82412b83c5ef010de3ff84e052fecd96 100644 (file)
@@ -100,12 +100,18 @@ public class Caption extends HTML {
                 setTitle(uidl.getStringAttribute("description"));
             }
         }
-        // Workaround for IE7 weirdness, returns bad height in some
+        // Workaround for IE weirdness, sometimes returns bad height in some
         // circumstances when Caption is empty. See #1444
-        // IE6 works perfectly without them. I wonder what happens when
-        // IE8 arrives...
-        if (isEmpty && Util.isIE7()) {
-            setHeight("0px");
+        // IE7 bugs more often. I wonder what happens when IE8 arrives...
+        if (Util.isIE()) {
+            if (isEmpty) {
+                setHeight("0px");
+                DOM.setStyleAttribute(getElement(), "overflow", "hidden");
+            } else {
+                setHeight("");
+                DOM.setStyleAttribute(getElement(), "overflow", "");
+            }
+
         }
 
     }