Telegram-Mini-Apps / telegram-apps

Made from scratch TypeScript packages, examples and documentation you will surely need to start developing on Telegram Mini Apps.
https://docs.telegram-mini-apps.com/
MIT License
543 stars 134 forks source link

[Bug]: Trim viewport with menu button view #415

Closed RealOFF closed 1 month ago

RealOFF commented 2 months ago

Telegram Application

Telegram for Android

Describe the Bug

When running my app that applies "@telegram-apps/react-router-integration@1.0.1" and "@telegram-apps/sdk-react@1.1.2" on Android using Manu Button, the viewport is cut off. If I add the "https://telegram.org/js/telegram-web-app.js" script to the page, the viewport behaves as it should. Do I understand correctly that there is some side-effect in this script that affects viewport, and this effect is not present in sdk?

To Reproduce

Steps to reproduce the behavior:

  1. Run telegram mini app from "Menu Button" using sdk npm package on Android without applying "https://telegram.org/js/telegram-web-app.js".
  2. Look at the viewport display.

Actual behavior:

Screenshot 2024-07-15 at 11 42 56

Expected Behavior

Screenshot 2024-07-15 at 11 46 14
heyqbnk commented 2 months ago

Check if this solution fits you: https://github.com/Telegram-Mini-Apps/issues/issues/25