Skip to content

[Bug] Url Schemes not working in WebApps #299

@Scino

Description

@Scino

URLs with protocols different from http:/https: don't work in Bot API's WebApps, breaking the user experience when the webapp includes features that require to open different apps (like sharing, playing media, etc...).
It doesn't work in anchor's href, nor launched by a window.open(), nor Telegram.WebApp.openLink().

Minimal reproducible html example, that on a normal mobile browser opens the whatsapp app (if installed), but doesn't work on Telegram:

<a href="whatsapp://send?text=Hello%20World">
    Open WhatsApp
</a>

The issue can be easily fixed by handling url scheme intents when the webview wants to load a URL (Android example: https://stackoverflow.com/a/53059413/14175236)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions