]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #1926 (random layout issues with Safari + Splitpanel)
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 6 Aug 2008 12:10:27 +0000 (12:10 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 6 Aug 2008 12:10:27 +0000 (12:10 +0000)
svn changeset:5150/svn branch:trunk

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

index efdc13b0dd43f672fd31298912882d0855b2d721..6f5060e7f0d565b92c7de1ad24fac1966a8d545d 100644 (file)
@@ -285,21 +285,25 @@ public class ISplitPanel extends ComplexPanel implements Paintable,
         secondChild = w;
     }
 
-    public void setHeight(String height) {
+    public void setHeight(final String height) {
         super.setHeight(height);
-        // give sane height
-        getOffsetHeight(); // shake IE
-        if (getOffsetHeight() < MIN_SIZE) {
-            super.setHeight(MIN_SIZE + "px");
+        if (isAttached()) {
+            // give sane height
+            getOffsetHeight(); // shake IE
+            if (getOffsetHeight() < MIN_SIZE) {
+                super.setHeight(MIN_SIZE + "px");
+            }
         }
     }
 
     public void setWidth(String width) {
         super.setWidth(width);
-        // give sane width
-        getOffsetWidth(); // shake IE
-        if (getOffsetWidth() < MIN_SIZE) {
-            super.setWidth(MIN_SIZE + "px");
+        if (isAttached()) {
+            // give sane width
+            getOffsetWidth(); // shake IE
+            if (getOffsetWidth() < MIN_SIZE) {
+                super.setWidth(MIN_SIZE + "px");
+            }
         }
     }