TelegramSwift
TelegramSwift copied to clipboard
Don't close mini app on Escape if `event.preventDefault()` is called
Currently, if the user presses the Escape key, the mini app is closed right away, even if this behavior is not expected.
It is not expected for the mini app to close directly when the Escape key is called, for example, when a dialog is open in the mini app. It is rather expected to first close that dialog first, and then close the mini app.