Merge pull request 'Make links in menu work on iOS' (#899) from menu into main

Reviewed-on: https://git.joinplu.me/Plume/Plume/pulls/899
This commit is contained in:
KitaitiMakoto 2021-02-14 15:02:03 +00:00
commit ce285bac17

View File

@ -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::<Element>()
.unwrap()
.closest("a")
.unwrap()
.is_some()
{
return;
}
self::document()
.get_element_by_id("menu")
.map(|menu| {