ui fix ios
This commit is contained in:
parent
65efe0c540
commit
28221232d6
|
|
@ -71,6 +71,18 @@
|
||||||
function closeSidebar() {
|
function closeSidebar() {
|
||||||
sidebarOpen = false;
|
sidebarOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$effect(() => {
|
||||||
|
if (sidebarOpen) {
|
||||||
|
document.body.style.overflow = 'hidden';
|
||||||
|
document.body.style.position = 'fixed';
|
||||||
|
document.body.style.width = '100%';
|
||||||
|
} else {
|
||||||
|
document.body.style.overflow = '';
|
||||||
|
document.body.style.position = '';
|
||||||
|
document.body.style.width = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if !authReady}
|
{#if !authReady}
|
||||||
|
|
@ -97,6 +109,7 @@
|
||||||
<button
|
<button
|
||||||
class="fixed inset-0 z-30 bg-black/50 md:hidden"
|
class="fixed inset-0 z-30 bg-black/50 md:hidden"
|
||||||
onclick={closeSidebar}
|
onclick={closeSidebar}
|
||||||
|
ontouchstart={(e) => e.stopPropagation()}
|
||||||
aria-label="Close sidebar"
|
aria-label="Close sidebar"
|
||||||
></button>
|
></button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue