]> source.dussan.org Git - vaadin-framework.git/commitdiff
Faulty if-clause caused ill-placed popup in some cases. Fixes #1886
authorMarc Englund <marc.englund@itmill.com>
Tue, 19 Aug 2008 11:26:22 +0000 (11:26 +0000)
committerMarc Englund <marc.englund@itmill.com>
Tue, 19 Aug 2008 11:26:22 +0000 (11:26 +0000)
svn changeset:5214/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IPopupCalendar.java

index 63af2f75d6bc75a9a0ad81cd1dbd37e80335a017..917aa1d28890bcd856ef0fd630c7f5b4ebd67ab1 100644 (file)
@@ -73,17 +73,18 @@ public class IPopupCalendar extends ITextualDate implements Paintable, Field,
                         l = Window.getClientWidth() + Window.getScrollLeft()\r
                                 - w;\r
                     }\r
-                    if (t + h > Window.getClientHeight()\r
+                    if (t + h + calendarToggle.getOffsetHeight() + 30 > Window\r
+                            .getClientHeight()\r
                             + Window.getScrollTop()) {\r
                         t = Window.getClientHeight() + Window.getScrollTop()\r
                                 - h - calendarToggle.getOffsetHeight() - 30;\r
                         l += calendarToggle.getOffsetWidth();\r
                     }\r
-                    \r
+\r
                     // fix size\r
                     popup.setWidth(w + "px");\r
                     popup.setHeight(h + "px");\r
-                    \r
+\r
                     popup.setPopupPosition(l, t\r
                             + calendarToggle.getOffsetHeight() + 2);\r
 \r