diff --git a/data/telegram.org/js/telegram-webview.js b/data/telegram.org/js/telegram-webview.js index e715b65c9f..a59bbf6229 100644 --- a/data/telegram.org/js/telegram-webview.js +++ b/data/telegram.org/js/telegram-webview.js @@ -599,6 +599,10 @@ postEvent('web_app_close'); } }; + Object.defineProperty(window.Telegram.WebApp, 'viewportHeight', { + get: function(){ return (viewportHeight === false ? window.innerHeight : viewportHeight) - mainButtonHeight; }, + enumerable: true + }); if (webAppData.theme_params) { setThemeParams(webAppData.theme_params); diff --git a/data/webappcontent.telegram.org/cafe.html b/data/webappcontent.telegram.org/cafe.html index 82701c3685..ccbbcc0983 100644 --- a/data/webappcontent.telegram.org/cafe.html +++ b/data/webappcontent.telegram.org/cafe.html @@ -9,7 +9,7 @@ - + +