Telegram-Mini-Apps / issues

Centralised storage of platform issues and enhancement proposals.
10 stars 1 forks source link

Event `web_app_set_background_color` works incorrectly #6

Open heyqbnk opened 2 years ago

heyqbnk commented 2 years ago

Describe the bug It seems like web_app_set_background_color works incorrectly on Android. In case, you call this method, visually, nothing happens. But if you close this Web App and open again, you will see set color unless application is loaded.

Firstly, set color should probably be dropped when application was closed. Secondly, could we make WebView background transparent to make it work as expected? I mean, we would like HTML body to be transparent to see previously specified color, is it possible?

To Reproduce Steps to reproduce the behavior:

  1. Open Web Apps polygon bot (source code)
  2. Open developers tools
  3. Call Web Apps method:
    bridge.postEvent('web_app_set_background_color', {color: '#ffffff'});
  4. See no changes in background even when body has no color specified
  5. Close application
  6. Open application again. See white background color when application is loading
  7. When application is loaded, specified color disappears

Expected behavior Background color is being set with color specified in method. Specified color is dropped when application was closed.

heyqbnk commented 1 year ago

Reported this issue in https://t.me/BugReports as long as could not find any other compatible source.