]> source.dussan.org Git - vaadin-framework.git/commitdiff
sanity check for tabsheet height, fixes error in IE if becomes too small
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 16 Sep 2008 08:53:56 +0000 (08:53 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 16 Sep 2008 08:53:56 +0000 (08:53 +0000)
svn changeset:5410/svn branch:trunk

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

index fc2f6b12aeba7b3666110a32d7b6fe0c0bd32146..1a0eb557fc739696ddb577027ac344d14069cb62 100644 (file)
@@ -380,9 +380,12 @@ public class ITabsheet extends ITabsheetBase implements
         if (height != null && height != "") {
             super.setHeight(height);
 
-            final int contentHeight = getOffsetHeight()
+            int contentHeight = getOffsetHeight()
                     - DOM.getElementPropertyInt(deco, "offsetHeight")
                     - tb.getOffsetHeight();
+            if (contentHeight < 0) {
+                contentHeight = 0;
+            }
 
             // Set proper values for content element
             DOM.setStyleAttribute(contentNode, "height", contentHeight + "px");