aboutsummaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2021-03-31 08:34:29 +0300
committerGitHub <noreply@github.com>2021-03-31 08:34:29 +0300
commite30226a19564c6ee77064e5178a7665554d57466 (patch)
tree1c7da6bddd8d7f678b104e5084b539a5348af562 /client/src
parentfe37cc443d2268d813aadfa09d0f2f881d5c464c (diff)
downloadvaadin-framework-e30226a19564c6ee77064e5178a7665554d57466.tar.gz
vaadin-framework-e30226a19564c6ee77064e5178a7665554d57466.zip
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