summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/VTooltip.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/VTooltip.java b/client/src/com/vaadin/client/VTooltip.java
index edd1273bf5..2fb5a8a293 100644
--- a/client/src/com/vaadin/client/VTooltip.java
+++ b/client/src/com/vaadin/client/VTooltip.java
@@ -210,6 +210,10 @@ public class VTooltip extends VOverlay {
x = Window.getClientWidth() - offsetWidth - MARGIN
+ Window.getScrollLeft();
}
+ // Do not allow x to be zero, for otherwise the tooltip does
+ // not close when the mouse is moved (see isTooltipOpen()).
+ int minX = Window.getScrollLeft() + MARGIN;
+ x = Math.max(x, minX);
return x;
}
@@ -245,6 +249,10 @@ public class VTooltip extends VOverlay {
y = Window.getScrollTop();
}
}
+ // Do not allow y to be zero, for otherwise the tooltip does
+ // not close when the mouse is moved (see isTooltipOpen()).
+ int minY = Window.getScrollTop() + MARGIN;
+ y = Math.max(y, minY);
return y;
}
});