Telegram-iOS icon indicating copy to clipboard operation
Telegram-iOS copied to clipboard

[Web Apps] "viewport_changed" provides not visible area size, but visible or minimal one

Open heyqbnk opened this issue 3 years ago • 0 comments

Checklist

  • [x] I am reporting an issue in existing functionality that does not work as intended
  • [x] I've searched for existing GitHub issues

Description

According to official documentation of viewport_changed event, it should send actual height of visible area of Web App. Currently, we get it with 1 exclusion - in case, when this height is less than some minimal value (for me it was 481px), native device sends it instead of visible area height.

Expected Behavior

Strongly following documentation, event should contain height of visible area.

Actual Behavior

viewport_changed event contains value which is not less than N px, where N is some fixed minimal value.

Steps to Reproduce

  1. Open Web Apps polygon bot (source code)
  2. Try dragging application modal almost to the bottom of the screen
  3. Open eruda console (bottom right cog in application interface)
  4. See viewport_changed events where height is not less than some fixed value, but should be close to 0.

Environment

Device: iPhone XR

iOS version: 16.1.1

App version: 9.3.2

heyqbnk avatar Jan 22 '23 13:01 heyqbnk