]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #2930, IE8 does not accept null for zIndex style property
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 14 May 2009 12:09:46 +0000 (12:09 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 14 May 2009 12:09:46 +0000 (12:09 +0000)
svn changeset:7807/svn branch:6.0

src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java

index a370909167c12b887aca61c916a48eea34574a01..0e1f56039a38b74b9b91c97325eb45d4fff6fddd 100644 (file)
@@ -303,7 +303,16 @@ public class VAbsoluteLayout extends ComplexPanel implements Container {
                 }
                 // ensure ne values
                 Style style = getElement().getStyle();
-                style.setProperty("zIndex", zIndex);
+                /*
+                 * IE8 dies when nulling zIndex, even in IE7 mode. All other css
+                 * properties (and even in older IE's) accept null values just
+                 * fine. Assign empty string instead of null.
+                 */
+                if (zIndex != null) {
+                    style.setProperty("zIndex", zIndex);
+                } else {
+                    style.setProperty("zIndex", "");
+                }
                 style.setProperty("top", top);
                 style.setProperty("left", left);
                 style.setProperty("right", right);