From ed22c6b103096f4a3f36baee2fcfc81d2636a7ba Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sat, 13 Feb 2021 23:40:18 +0900 Subject: [PATCH] Make links in menu work on iOS --- plume-front/src/lib.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plume-front/src/lib.rs b/plume-front/src/lib.rs index 191a3397..ecaf1d2c 100755 --- a/plume-front/src/lib.rs +++ b/plume-front/src/lib.rs @@ -114,7 +114,18 @@ fn menu() { .unwrap(); show_menu.forget(); - let close_menu = Closure::wrap(Box::new(|_: TouchEvent| { + let close_menu = Closure::wrap(Box::new(|evt: TouchEvent| { + if evt + .target() + .unwrap() + .dyn_ref::() + .unwrap() + .closest("a") + .unwrap() + .is_some() + { + return; + } self::document() .get_element_by_id("menu") .map(|menu| {