Skip to content

fix: mail and tel links not working#28

Open
uri-ustrell wants to merge 1 commit into
masterfrom
feature/fix-tel-mailto-links
Open

fix: mail and tel links not working#28
uri-ustrell wants to merge 1 commit into
masterfrom
feature/fix-tel-mailto-links

Conversation

@uri-ustrell
Copy link
Copy Markdown
Collaborator

@uri-ustrell uri-ustrell commented May 27, 2026

Description

tel: and mailto: links inside the WebView were silently dropped on Android. The WebView has no built-in handler for non-HTTP(S) schemes, so tapping a phone number or email address did nothing.

Fix

Added onShouldStartLoadWithRequest to the <WebView> in App.js. Any URL starting with http:// or https:// loads normally inside the WebView. Any other scheme (tel:, mailto:, etc.) is delegated to the OS via Linking.openURL(), which opens the default phone or email app.

Changes

  • App.js: added Linking import and onShouldStartLoadWithRequest prop to <WebView>

⚠️ Testing note

This fix has not been validated against a real app session — no account was available to log in and reach a page containing tel: or mailto: links. The implementation follows the standard pattern for this problem in react-native-webview and should be correct, but manual verification by someone with a staging/production account is strongly recommended before merging.

(This is also the reason to be a quite inline and verbose code. I do recommend moving the logic outside the return.)

Closes #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phones and email link doesn't work

1 participant