]> source.dussan.org Git - vaadin-framework.git/commitdiff
Ensure large tooltips can be closed on touch devices. (#12282) (#12299)
authorAnna Koskinen <Ansku@users.noreply.github.com>
Mon, 17 May 2021 10:10:46 +0000 (13:10 +0300)
committerGitHub <noreply@github.com>
Mon, 17 May 2021 10:10:46 +0000 (13:10 +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;