From: Matti Tahvonen Date: Fri, 16 Nov 2007 09:00:03 +0000 (+0000) Subject: fixes #1108 X-Git-Tag: 6.7.0.beta1~5562 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6a6c8524db8a69f7ff70a2648e8fb37f7081673c;p=vaadin-framework.git fixes #1108 svn changeset:2835/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IPopupCalendar.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IPopupCalendar.java index 0242234c0d..86e67cf1b2 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IPopupCalendar.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IPopupCalendar.java @@ -52,12 +52,13 @@ public class IPopupCalendar extends ITextualDate implements Paintable, int h = calendar.getOffsetHeight(); int t = calendarToggle.getAbsoluteTop(); int l = calendarToggle.getAbsoluteLeft(); - if (l + w > Window.getClientWidth()) { - l = Window.getClientWidth() - w; + if (l + w > Window.getClientWidth() + Window.getScrollLeft()) { + l = Window.getClientWidth() + Window.getScrollLeft() - w; } - if (t + h > Window.getClientHeight()) { - t = Window.getClientHeight() - h - - calendarToggle.getOffsetHeight() - 2; + if (t + h > Window.getClientHeight() + Window.getScrollTop()) { + t = Window.getClientHeight() + Window.getScrollTop() - h + - calendarToggle.getOffsetHeight() - 30; + l += calendarToggle.getOffsetWidth(); } popup.setPopupPosition(l, t + calendarToggle.getOffsetHeight() + 2); popup.setWidth(w + "px");