From 7ca2e1e0d5b69cc8a8237a73e57ce5cc46415c1c Mon Sep 17 00:00:00 2001 From: Anna Koskinen Date: Fri, 30 Apr 2021 14:34:16 +0300 Subject: [PATCH] Ensure large tooltips can be closed on touch devices. (#12282) Fixes #10435 --- client/src/main/java/com/vaadin/client/VTooltip.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/main/java/com/vaadin/client/VTooltip.java b/client/src/main/java/com/vaadin/client/VTooltip.java index 9e5b85c4e8..8bd97b40d7 100644 --- a/client/src/main/java/com/vaadin/client/VTooltip.java +++ b/client/src/main/java/com/vaadin/client/VTooltip.java @@ -302,7 +302,7 @@ public class VTooltip extends VOverlay { // Do not allow x to be zero, for otherwise the tooltip // does not close when the mouse is moved (see // isTooltipOpen()). #15129 - int minX = Window.getScrollLeft(); + int minX = Math.max(1, Window.getScrollLeft()); x = Math.max(x, minX); } return x; -- 2.39.5