mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-25 13:01:08 +00:00
Make links in menu work on iOS
This commit is contained in:
parent
94ccbd6190
commit
ed22c6b103
1 changed files with 12 additions and 1 deletions
|
@ -114,7 +114,18 @@ fn menu() {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
show_menu.forget();
|
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()
|
self::document()
|
||||||
.get_element_by_id("menu")
|
.get_element_by_id("menu")
|
||||||
.map(|menu| {
|
.map(|menu| {
|
||||||
|
|
Loading…
Reference in a new issue