summaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2021-04-13 16:24:21 +0300
committerGitHub <noreply@github.com>2021-04-13 16:24:21 +0300
commite8c78e60a0441b7ca0520bd065888e991e782a55 (patch)
treea32dc7aa9e1d2817200320acb27be36669087ec9 /client/src
parent8c5e36b982d30c3881f149cffbed60c92e10249a (diff)
downloadvaadin-framework-e8c78e60a0441b7ca0520bd065888e991e782a55.tar.gz
vaadin-framework-e8c78e60a0441b7ca0520bd065888e991e782a55.zip
Fix Window dragging on touch screen. (#12260) (#12264)
* Fix Window dragging on touch screen. (#12260) - Added check for touch move event in order to allow the same flow for both mouse and touch events when dragging a Window by its header. - Can be tested with SubwindowDraggability class. Fixes #12257 Co-authored-by: Jakub Antoniak <j.antoniak8@gmail.com>
Diffstat (limited to 'client/src')
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VWindow.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VWindow.java b/client/src/main/java/com/vaadin/client/ui/VWindow.java
index ff013ccf20..fb383359ce 100644
--- a/client/src/main/java/com/vaadin/client/ui/VWindow.java
+++ b/client/src/main/java/com/vaadin/client/ui/VWindow.java
@@ -1043,7 +1043,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
headerDragPending = event;
bubble = false;
- } else if (type == Event.ONMOUSEMOVE
+ } else if ((type == Event.ONMOUSEMOVE || type == Event.ONTOUCHMOVE)
&& headerDragPending != null) {
// ie won't work unless this is set here
dragging = true;
@@ -1051,7 +1051,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
onDragEvent(event);
headerDragPending = null;
bubble = false;
- } else if (type != Event.ONMOUSEMOVE) {
+ } else if (type != Event.ONMOUSEMOVE && type != Event.ONTOUCHMOVE) {
// The event can propagate to the parent in case it is a
// mouse move event. This is needed for tooltips to work in
// header and footer, see Ticket #19073