From cd52a72c85ee94316b767f5a62477435b5f0ec45 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Sun, 5 May 2024 20:53:13 +0300 Subject: [PATCH] fix #926 Select with many entries / Unable to scroll on touch devices --- .../java/org/dominokit/domino/ui/menu/AbstractMenuItem.java | 4 ---- .../src/main/java/org/dominokit/domino/ui/menu/Menu.java | 3 +++ pom.xml | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java index 9e1ce2aa8..6928310d6 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/AbstractMenuItem.java @@ -104,8 +104,6 @@ public AbstractMenuItem() { this.addEventListener( EventType.touchstart.getName(), evt -> { - evt.stopPropagation(); - evt.preventDefault(); focus(); openSubMenu(); }); @@ -148,8 +146,6 @@ public > T setSelectable(boolean selectable) { } private void onSelected(Event evt) { - evt.stopPropagation(); - evt.preventDefault(); if (parent.isMultiSelect() && isSelected()) { deselect(); } else { diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java index 25cff8e98..1bb8ed0c7 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/menu/Menu.java @@ -402,6 +402,9 @@ public Menu() { 0); } }; + + this.addEventListener(EventType.touchstart.getName(), Event::stopPropagation); + this.addEventListener(EventType.touchend.getName(), Event::stopPropagation); } public void focusFirstMatch(String token) { diff --git a/pom.xml b/pom.xml index b1b5e6a28..3070773fb 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,7 @@ UTF-8 UTF-8 1.2.1 - 2.10.0 + 2.11.0 1.0.4 1.0.2 1.0.0