fix: Prevent ghost clicks on mobile sidebar backdrop
This commit is contained in:
@@ -346,7 +346,10 @@ pub fn App() -> impl IntoView {
|
|||||||
<div
|
<div
|
||||||
class="fixed inset-0 bg-black/60 backdrop-blur-sm transition-opacity cursor-default"
|
class="fixed inset-0 bg-black/60 backdrop-blur-sm transition-opacity cursor-default"
|
||||||
on:click=move |_| set_show_mobile_sidebar.set(false)
|
on:click=move |_| set_show_mobile_sidebar.set(false)
|
||||||
on:touchstart=move |_| set_show_mobile_sidebar.set(false)
|
on:touchstart=move |ev| {
|
||||||
|
ev.prevent_default();
|
||||||
|
set_show_mobile_sidebar.set(false);
|
||||||
|
}
|
||||||
></div>
|
></div>
|
||||||
<aside
|
<aside
|
||||||
class={format!("relative w-80 max-w-[85vw] h-full shadow-2xl p-6 flex flex-col animate-in slide-in-from-left duration-300 border-r {}", sidebar_bg)}
|
class={format!("relative w-80 max-w-[85vw] h-full shadow-2xl p-6 flex flex-col animate-in slide-in-from-left duration-300 border-r {}", sidebar_bg)}
|
||||||
|
|||||||
Reference in New Issue
Block a user