Skip to content

Commit 7d371ea

Browse files
committed
fix: react linking canOpenURL does not recognize mailto protocol but it can open the mailto url
1 parent dac9cdd commit 7d371ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebViewShared.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const createOnShouldStartLoadWithRequest = (
9999

100100
if (foundMatchInAllowlist) {
101101
Linking.canOpenURL(url).then((supported) => {
102-
if (supported && isTopFrame) {
102+
if ((supported && isTopFrame) || protocol.startsWith('mailto:')) {
103103
return Linking.openURL(url);
104104
}
105105
console.warn(`Can't open url: ${url}`);

0 commit comments

Comments
 (0)