Parcourir la source

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>
tags/8.14.0.alpha1
Anna Koskinen il y a 3 ans
Parent
révision
e30226a195
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2
    2
      client/src/main/java/com/vaadin/client/ui/VWindow.java

+ 2
- 2
client/src/main/java/com/vaadin/client/ui/VWindow.java Voir le fichier

@@ -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

Chargement…
Annuler
Enregistrer