aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2008-11-28 07:09:34 +0000
committerArtur Signell <artur.signell@itmill.com>2008-11-28 07:09:34 +0000
commita605dbdf456ec04d94154ab856e81d24f6ef7367 (patch)
tree9ea31dec1ebb5db0da84a469665647fc67666d39 /src
parent93dc97ef61d0846cea48462174577096794ef400 (diff)
downloadvaadin-framework-a605dbdf456ec04d94154ab856e81d24f6ef7367.tar.gz
vaadin-framework-a605dbdf456ec04d94154ab856e81d24f6ef7367.zip
Fix for #2234 - IE ComboBox popup menu width
svn changeset:6027/svn branch:trunk
Diffstat (limited to 'src')
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java
index 81fa6b9ab9..86b88a40b7 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java
@@ -104,6 +104,7 @@ public class IFilterSelect extends Composite implements Paintable, Field,
private boolean isPagingEnabled = true;
private long lastAutoClosed;
+ private int menuLeftMargin = -1;
SuggestionPopup() {
super(true, false, true);
@@ -303,6 +304,24 @@ public class IFilterSelect extends Composite implements Paintable, Field,
naturalMenuWidth = desiredWidth;
}
+ if (BrowserInfo.get().isIE()) {
+ // Take left margin into account
+ if (menuLeftMargin == -1) {
+ int menuOffsetLeft = menu.getElement().getOffsetLeft();
+ int menuParentOffsetLeft = getContainerElement()
+ .getOffsetLeft();
+ menuLeftMargin = menuOffsetLeft - menuParentOffsetLeft;
+ }
+
+ /*
+ * IE requires us to specify the width for the container
+ * element. Otherwise it will be 100% wide
+ */
+ int rootWidth = naturalMenuWidth + menuLeftMargin;
+ DOM.setStyleAttribute(getContainerElement(), "width", rootWidth
+ + "px");
+ }
+
if (offsetHeight + getPopupTop() > Window.getClientHeight()
+ Window.getScrollTop()) {
// popup on top of input instead