style: fix mobile zoom on input focus/blur

This commit is contained in:
dswbx
2025-09-03 08:28:27 +02:00
parent 111b2ae364
commit 8b4bf0d94a
4 changed files with 19 additions and 8 deletions

View File

@@ -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 (
<div ref={scrollRef} style={{ height: `${height - offset}px` }} {...props}>