diff options
author | Anna Koskinen <anna@vaadin.com> | 2013-01-02 10:22:26 +0200 |
---|---|---|
committer | Anna Koskinen <anna@vaadin.com> | 2013-01-02 10:36:19 +0200 |
commit | c8cd986880196cad2d0be08a292d89ec8de8cc03 (patch) | |
tree | ab14410ab68bee89248030af39eb556fd84bcf0a /client | |
parent | 7ed4e5e6ff8ca08ab50225ac5c33bed59a226217 (diff) | |
download | vaadin-framework-c8cd986880196cad2d0be08a292d89ec8de8cc03.tar.gz vaadin-framework-c8cd986880196cad2d0be08a292d89ec8de8cc03.zip |
Merge of (#9862) to Vaadin 7.
Tooltip location fix.
Change-Id: Idfdf3385d793569f028fbeaba0b338810095f143
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/VTooltip.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/VTooltip.java b/client/src/com/vaadin/client/VTooltip.java index a4c4766e4f..2fb7c39d5f 100644 --- a/client/src/com/vaadin/client/VTooltip.java +++ b/client/src/com/vaadin/client/VTooltip.java @@ -117,12 +117,14 @@ public class VTooltip extends VOverlay { if (x + offsetWidth + MARGIN - Window.getScrollLeft() > Window .getClientWidth()) { - x = Window.getClientWidth() - offsetWidth - MARGIN; + x = Window.getClientWidth() - offsetWidth - MARGIN + + Window.getScrollLeft(); } if (y + offsetHeight + MARGIN - Window.getScrollTop() > Window .getClientHeight()) { - y = tooltipEventMouseY - 5 - offsetHeight; + y = tooltipEventMouseY - 5 - offsetHeight + + Window.getScrollTop(); if (y - Window.getScrollTop() < 0) { // tooltip does not fit on top of the mouse either, // put it at the top of the screen |