]> source.dussan.org Git - vaadin-framework.git/commitdiff
Ensure large tooltips can be closed on touch devices. (#12282)
authorAnna Koskinen <Ansku@users.noreply.github.com>
Fri, 30 Apr 2021 11:34:16 +0000 (14:34 +0300)
committerGitHub <noreply@github.com>
Fri, 30 Apr 2021 11:34:16 +0000 (14:34 +0300)
Fixes #10435

client/src/main/java/com/vaadin/client/VTooltip.java

index 9e5b85c4e8cb4c5dad0e1cc1aea0e42aa3f25e27..8bd97b40d71786c3278f1f5a1f0523064473b6fb 100644 (file)
@@ -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;