From f7b108b9aac3475fa3ddfd52cfef17915ed28f68 Mon Sep 17 00:00:00 2001 From: Anna Koskinen Date: Mon, 17 May 2021 13:10:46 +0300 Subject: [PATCH] Ensure large tooltips can be closed on touch devices. (#12282) (#12299) 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