From: Matti Tahvonen Date: Wed, 12 Sep 2007 12:47:53 +0000 (+0000) Subject: Better positioning for selects with lazy loading X-Git-Tag: 6.7.0.beta1~6017 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f100161e82e4c711c7ac01d1b7946cb13bf8cafb;p=vaadin-framework.git Better positioning for selects with lazy loading svn changeset:2291/svn branch:trunk --- 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 b9bafd2640..787b65d9e0 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java @@ -73,6 +73,10 @@ public class IFilterSelect extends Composite implements Paintable, } } + /** + * @author mattitahvonen + * + */ public class SuggestionPopup extends PopupPanel implements PositionCallback { private SuggestionMenu menu; @@ -186,11 +190,16 @@ public class IFilterSelect extends Composite implements Paintable, DOM.setStyleAttribute(this.up, "display", "none"); DOM.setStyleAttribute(this.status, "display", "none"); } + isPagingEnabled = paging; } + + /* (non-Javadoc) + * @see com.google.gwt.user.client.ui.PopupPanel$PositionCallback#setPosition(int, int) + */ public void setPosition(int offsetWidth, int offsetHeight) { ApplicationConnection.getConsole().log("callback"); - if (offsetHeight > Window.getClientHeight()) { + if (!isPagingEnabled && offsetHeight > Window.getClientHeight()) { offsetHeight = Window.getClientHeight(); menu.setHeight(offsetHeight + "px"); DOM.setStyleAttribute(menu.getElement(), "overflow", "auto");