diff --git a/panel/src/app/(tg)/layout.tsx b/panel/src/app/(tg)/layout.tsx index 853bf386..7e10abe0 100644 --- a/panel/src/app/(tg)/layout.tsx +++ b/panel/src/app/(tg)/layout.tsx @@ -11,6 +11,12 @@ import Script from "next/script"; * `afterInteractive` strategy instead — `waitForTelegramWebApp` (in * lib/telegram/webapp.ts) briefly polls for `window.Telegram.WebApp` to * absorb the resulting load race rather than assuming it's present on mount. + * + * Height reads `--tg-viewport-stable-height`, a :root variable the Telegram + * script itself maintains (steady during keyboard/panel animations, unlike + * dvh inside the webview); outside Telegram it's unset and 100dvh applies. + * `#tg-shell` is the hook the page uses to scope Telegram theme variables + * to this surface only. */ export default function TelegramLayout({ children, @@ -18,7 +24,11 @@ export default function TelegramLayout({ children: React.ReactNode; }) { return ( -
+