Repository: zng-ui/zng (language: rust)

Issue:
Android Menus
Menu issues on Android:

* Menu shows keyboard shortcuts.
* Combo box drop down does not show (settings lang) fixed #471


Discussion / hints:
Combo box issue was actually the tap position incorrect.

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4dd3d32bf..2b5ab9237 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
 # Unreleased
 
+* Don't show keyboard shortcuts in mobile menus.
 * Fix incorrect `TouchInputArgs::position` in nested windows.
 
 # 0.11.7
diff --git a/crates/zng-wgt-menu/Cargo.toml b/crates/zng-wgt-menu/Cargo.toml
index 703e9e86a..fe3bb6386 100644
--- a/crates/zng-wgt-menu/Cargo.toml
+++ b/crates/zng-wgt-menu/Cargo.toml
@@ -35,3 +35,4 @@ zng-wgt-rule-line = { path = "../zng-wgt-rule-line", version = "0.3.23" }
 zng-ext-l10n = { path = "../zng-ext-l10n", version = "0.5.12" }
 zng-wgt-toggle = { path = "../zng-wgt-toggle", version = "0.3.23" }
 zng-wgt-tooltip = { path = "../zng-wgt-tooltip", version = "0.4.13" }
+zng-wgt-window = { path = "../zng-wgt-window", version = "0.5.13" }
diff --git a/crates/zng-wgt-menu/src/lib.rs b/crates/zng-wgt-menu/src/lib.rs
index b0424bf28..cdcccd1d7 100644
--- a/crates/zng-wgt-menu/src/lib.rs
+++ b/crates/zng-wgt-menu/src/lib.rs
@@ -26,6 +26,7 @@ use zng_wgt_input::{cursor, focus::alt_focus_scope, CursorIcon};
 use zng_wgt_size_offset::size;
 use zng_wgt_style::{impl_style_fn, style_fn, Style, StyleMix};
 use zng_wgt_text::Text;
+use zng_wgt_window::is_mobile;
 
 pub mod context;
 pub mod popup;
@@ -150,6 +151,7 @@ impl ButtonStyle {
                 });
                 align = Align::CENTER;
             };
+
             icon_fn = BUTTON.cmd().flat_map(|c| match c {
                 Some(c) => c.icon().boxed(),
                 None => LocalVar(WidgetFn::nil()).boxed()
@@ -165,6 +167,10 @@ impl ButtonStyle {
                 opacity = 50.pct();
                 cursor = CursorIcon::NotAllowed;
             }
+
+            when *#is_mobile {
+                shortcut_txt = NilUiNode;
+            }
         }
     }
 }


Test patch: