From 7d371eafea44d14c169a2dd08479b274bb09df6b Mon Sep 17 00:00:00 2001 From: Sergii Bondarenko Date: Fri, 25 Jul 2025 12:27:12 +0200 Subject: [PATCH] fix: react linking canOpenURL does not recognize mailto protocol but it can open the mailto url --- src/WebViewShared.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WebViewShared.tsx b/src/WebViewShared.tsx index 5e2b209af..1986c6601 100644 --- a/src/WebViewShared.tsx +++ b/src/WebViewShared.tsx @@ -99,7 +99,7 @@ const createOnShouldStartLoadWithRequest = ( if (foundMatchInAllowlist) { Linking.canOpenURL(url).then((supported) => { - if (supported && isTopFrame) { + if ((supported && isTopFrame) || protocol.startsWith('mailto:')) { return Linking.openURL(url); } console.warn(`Can't open url: ${url}`);