From 99cdff8e7e22ba2c5b52189040dc5ecf368e0acc Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 5 Jan 2010 09:25:49 +0000 Subject: [PATCH] Fix for #3917 - Menubar is not collapsed in IE6 svn changeset:10628/svn branch:6.2 --- .../vaadin/terminal/gwt/client/ui/VMenuBar.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java index 9cad1fbd91..4e17dcb879 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java @@ -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); -- 2.39.5