fix(ui): improve theme selector backdrop behavior on iOS Safari

This commit is contained in:
spinline
2026-02-01 23:09:39 +03:00
parent 260a121c9a
commit 8b9b51f270

View File

@@ -48,12 +48,17 @@ pub fn StatusBar() -> impl IntoView {
<Show when=move || theme_open.get() fallback=|| ()> <Show when=move || theme_open.get() fallback=|| ()>
// Backdrop to close on outside click // Backdrop to close on outside click
// iOS Safari requires cursor:pointer inline style for click events on div elements
<div <div
class="fixed inset-0 z-[99] cursor-pointer bg-black/0" class="fixed inset-0 z-[99] bg-black/0"
style="cursor: pointer; -webkit-tap-highlight-color: transparent;"
role="button" role="button"
tabindex="-1" tabindex="-1"
on:click=move |_| set_theme_open.set(false) on:click=move |_| set_theme_open.set(false)
on:touchstart=move |_| set_theme_open.set(false) on:touchend=move |e| {
e.prevent_default();
set_theme_open.set(false);
}
></div> ></div>
</Show> </Show>