diff --git a/src/App.tsx b/src/App.tsx index 4045b5dc6..f5fa7d69f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -25,6 +25,20 @@ export default function App() { document.documentElement.style.background = "transparent"; document.getElementById("root")?.style.setProperty("background", "transparent"); } + + // HUD is a fixed-size BrowserWindow; pin the document shell and hide overflow + // so the renderer can't introduce scrollbars (see issue #305). + if (type === "hud-overlay") { + document.documentElement.style.height = "100%"; + document.documentElement.style.overflow = "hidden"; + document.body.style.height = "100%"; + document.body.style.margin = "0"; + document.body.style.overflow = "hidden"; + const root = document.getElementById("root"); + root?.style.setProperty("height", "100%"); + root?.style.setProperty("min-height", "0"); + root?.style.setProperty("overflow", "hidden"); + } }, [windowType]); useEffect(() => { diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsx index 9b7d80907..bffbd9c9a 100644 --- a/src/components/launch/LaunchWindow.tsx +++ b/src/components/launch/LaunchWindow.tsx @@ -314,7 +314,13 @@ export function LaunchWindow() { }; return ( -