diff options
author | Artur Signell <artur.signell@itmill.com> | 2009-06-29 13:59:01 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2009-06-29 13:59:01 +0000 |
commit | f7a0931c2d4242442c14fe88b949df7357884a90 (patch) | |
tree | 4179f70b615af464825bf7d685ac5b862a26b10e | |
parent | 458a9ae9b9e7868e4244d89286e8402088967c76 (diff) | |
download | vaadin-framework-f7a0931c2d4242442c14fe88b949df7357884a90.tar.gz vaadin-framework-f7a0931c2d4242442c14fe88b949df7357884a90.zip |
Fix for #3099 - PopupView is shown off screen
svn changeset:8264/svn branch:6.0
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VPopupView.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java b/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java index c6041d71d1..1bdefe6372 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java @@ -160,7 +160,7 @@ public class VPopupView extends HTML implements Container { int left = hostHorizontalCenter - offsetWidth / 2; int top = hostVerticalCenter - offsetHeight / 2; - // Superclass takes care of top and left + // Don't show the popup outside the screen. if ((left + offsetWidth) > windowRight) { left -= (left + offsetWidth) - windowRight; } @@ -169,6 +169,14 @@ public class VPopupView extends HTML implements Container { top -= (top + offsetHeight) - windowBottom; } + if (left < 0) { + left = 0; + } + + if (top < 0) { + top = 0; + } + popup.setPopupPosition(left, top); popup.setVisible(true); |