Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Telegram Mini Apps] openLink always opens external browser #1670

Open
2 tasks done
nikitakoschelenko opened this issue Jan 12, 2025 · 0 comments
Open
2 tasks done

[Telegram Mini Apps] openLink always opens external browser #1670

nikitakoschelenko opened this issue Jan 12, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@nikitakoschelenko
Copy link

Checklist

  • I am reporting an issue in existing functionality that does not work as intended
  • I've searched for existing GitHub issues

Description

The Telegram.WebApp.openLink method on iOS always opens links in an external browser. There is no option to open the link in Telegram's in-app browser. In contrast, on Android, links open in the in-app browser by default.

self.context.sharedContext.openExternalUrl(context: self.context, urlContext: .generic, url: url, forceExternal: true, presentationData: self.context.sharedContext.currentPresentationData.with { $0 }, navigationController: nil, dismissInput: {})

Expected Behavior

Links opened using the openLink method in the Mini App should open in Telegram's in-app browser on iOS if the tryBrowser parameter is not explicitly specified, similar to the behavior on Android.

Actual Behavior

Links opened using the openLink method on iOS are always opened in an external browser, with no option to use the in-app browser.

Steps to Reproduce

  1. Call the openLink method with any valid URL and any tryBrowser value.
  2. Observe that the link is opened in an external browser.

Screenshots and Videos

<button onClick={() => Telegram.WebApp.openLink('https://example.com')}>
    Open link
</button>
ScreenRecording_01-12-2025.17-03-40_1.MP4

Environment

Device: iPhone 15
iOS version: 18.1
App version: 11.6.1

@nikitakoschelenko nikitakoschelenko added the bug Something isn't working label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant