From 8b4bf0d94a29ea03183348ea0f3907d0d83e129e Mon Sep 17 00:00:00 2001 From: dswbx Date: Wed, 3 Sep 2025 08:28:27 +0200 Subject: [PATCH] style: fix mobile zoom on input focus/blur --- app/src/ui/layouts/AppShell/AppShell.tsx | 13 +++++++++---- app/src/ui/main.css | 4 ++++ app/src/ui/routes/media/media.settings.tsx | 4 ++-- app/src/ui/styles.css | 6 ++++-- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/app/src/ui/layouts/AppShell/AppShell.tsx b/app/src/ui/layouts/AppShell/AppShell.tsx index b6f704a..ad89ce0 100644 --- a/app/src/ui/layouts/AppShell/AppShell.tsx +++ b/app/src/ui/layouts/AppShell/AppShell.tsx @@ -397,11 +397,16 @@ export function MaxHeightContainer(props: ComponentPropsWithoutRef<"div">) { } } - useEffect(updateHeaderHeight, []); + useEffect(() => { + updateHeaderHeight(); + const resize = throttle(updateHeaderHeight, 500); - if (typeof window !== "undefined") { - window.addEventListener("resize", throttle(updateHeaderHeight, 500)); - } + window.addEventListener("resize", resize); + + return () => { + window.removeEventListener("resize", resize); + }; + }, []); return (
diff --git a/app/src/ui/main.css b/app/src/ui/main.css index 755af31..4d0f459 100644 --- a/app/src/ui/main.css +++ b/app/src/ui/main.css @@ -122,3 +122,7 @@ body, @utility debug-blue { @apply border-blue-500 border; } +@utility w-min-content { + width: min-content; + width: -webkit-min-content; +} diff --git a/app/src/ui/routes/media/media.settings.tsx b/app/src/ui/routes/media/media.settings.tsx index 3a904e2..f995482 100644 --- a/app/src/ui/routes/media/media.settings.tsx +++ b/app/src/ui/routes/media/media.settings.tsx @@ -139,7 +139,7 @@ function Adapters() { Media Adapter: {ctx.selected === null && (Choose one)} -
+
{ctx.schemas?.map((schema: any, i) => (