]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #3917 - Menubar is not collapsed in IE6
authorArtur Signell <artur.signell@itmill.com>
Tue, 5 Jan 2010 09:25:49 +0000 (09:25 +0000)
committerArtur Signell <artur.signell@itmill.com>
Tue, 5 Jan 2010 09:25:49 +0000 (09:25 +0000)
svn changeset:10628/svn branch:6.2

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

index 9cad1fbd91ff7b317882e56b117070c682d2fbb1..4e17dcb8798d27ef47625ffe977d51e6bf7472f2 100644 (file)
@@ -787,7 +787,21 @@ public class VMenuBar extends Widget implements Paintable,
                 paddingWidth = widthBefore - getElement().getClientWidth();
                 getElement().getStyle().setProperty("padding", "");
             }
+            String overflow = "";
+            if (BrowserInfo.get().isIE6()) {
+                // IE6 cannot measure available width correctly without
+                // overflow:hidden
+                overflow = getElement().getStyle().getProperty("overflow");
+                getElement().getStyle().setProperty("overflow", "hidden");
+            }
+
             int availableWidth = getElement().getClientWidth() - paddingWidth;
+
+            if (BrowserInfo.get().isIE6()) {
+                // IE6 cannot measure available width correctly without
+                // overflow:hidden
+                getElement().getStyle().setProperty("overflow", overflow);
+            }
             int diff = availableWidth - getConsumedWidth();
 
             removeItem(moreItem);