fix: mobile sidebar — cursor-pointer on SheetOverlay (iOS tap-to-close), modal=false prevents body position:fixed layout shift, scrollbar-gutter stable on desktop

This commit is contained in:
egecankomur
2026-05-14 19:47:18 +03:00
parent 668fb7108b
commit 5622b0ef07
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -115,6 +115,9 @@
* { * {
@apply border-border outline-ring/50; @apply border-border outline-ring/50;
} }
html {
scrollbar-gutter: stable;
}
body { body {
@apply bg-background text-foreground; @apply bg-background text-foreground;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
+1 -1
View File
@@ -34,7 +34,7 @@ function SheetOverlay({
<SheetPrimitive.Overlay <SheetPrimitive.Overlay
data-slot="sheet-overlay" data-slot="sheet-overlay"
className={cn( className={cn(
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 cursor-pointer",
className className
)} )}
{...props} {...props}
+1 -1
View File
@@ -187,7 +187,7 @@ function Sidebar({
if (isMobile) { if (isMobile) {
return ( return (
<Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}> <Sheet open={openMobile} onOpenChange={setOpenMobile} modal={false} {...props}>
<SheetContent <SheetContent
data-sidebar="sidebar" data-sidebar="sidebar"
data-slot="sidebar" data-slot="sidebar"