瀏覽代碼

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 3 年之前
父節點
當前提交
e30226a195
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 2 行新增2 行删除
  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 查看文件

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

Loading…
取消
儲存