Telegram-iOS
Telegram-iOS copied to clipboard
[Web Apps] "popup_closed" event contains incorrect payload
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 popup_closed documentation, in case no button was clicked, we should receive empty object ({}), but not null.
Expected Behavior
popup_closed event should contain {} payload in case, no button were clicked.
Actual Behavior
popup_closed payload contains null.
Steps to Reproduce
- Open Web Apps polygon bot (source code)
- Open developers tools (F12)
- Call Web Apps method:
bridge.postEvent('web_app_open_popup', {
title: 'Title',
message: 'Message',
buttons: [{type: 'ok', id: 'ok'}]
})
- Close popup by clicking outside or by clicking popup top right cross
- See log in console:
[...] [Bridge] [processEvent] popup_closed null
It means, application received event popup_closed with payload presented as null.
Environment
Device: iPhone XR
iOS version: 16.1.1
App version: 9.3.2