The Mini App instance is closed after popup is shown, even though the popup.open(...).then() is not calling the close() method to manually close the window.
The issue persists in Telegram client 11.1.267602 running on macOS v14.5.
If you feel the need to analyze the code, please clone the repo I prepared for the demonstration purposes (currently I don't have an opportunity to prepare the sandbox).
There's this line of code in there:
const onCloseClicked = () => {
if (Object.entries(form.formState.dirtyFields).length === 0) {
form.reset();
setOpen(false);
return;
}
popup.open({ message: "Data will be removed", buttons: [
{ id: "cancel", type: "cancel" },
{ id: "ok", type: "destructive", text: "ok" }
]}).then((id) => {
if (id === "ok") {
setOpen(false);
form.reset();
}
});
}
the setOpen(false) is responsible for closing the modal only, not the Mini App window
Telegram Application
Telegram for macOS
Describe the Bug
The Mini App instance is closed after popup is shown, even though the popup.open(...).then() is not calling the close() method to manually close the window.
The issue persists in Telegram client
11.1.267602
running on macOSv14.5
.If you feel the need to analyze the code, please clone the repo I prepared for the demonstration purposes (currently I don't have an opportunity to prepare the sandbox).
There's this line of code in there:
the
setOpen(false)
is responsible for closing the modal only, not the Mini App windowTo Reproduce
Steps to reproduce the behavior:
Expected Behavior
The confirmation popup is shown and the Mini App is still open