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

Cannot open mailto links[bug] #5521

Closed
anterpin opened this issue Nov 1, 2022 · 6 comments
Closed

Cannot open mailto links[bug] #5521

anterpin opened this issue Nov 1, 2022 · 6 comments
Labels
platform: Linux status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@anterpin
Copy link

anterpin commented Nov 1, 2022

Describe the bug

Tauri cannot open mailto links

image

Reproduction

-- tauri.conf.json

"allowlist": {
	"all": true,
	"shell": {
		"open": true
	}
},

-- javascript

<a href="mailto:user@mail.com"> test </a>

Expected behavior

It should open the default mail application

Platform and versions

Environment
  › OS: Manjaro 22.0.0 X64
  › Node.js: 16.16.0
  › npm: 8.19.2
  › pnpm: Not installed!
  › yarn: Not installed!
  › rustup: 1.25.1
  › rustc: 1.64.0
  › cargo: 1.64.0
  › Rust toolchain: stable-x86_64-unknown-linux-gnu 

Packages
  › @tauri-apps/cli [NPM]: 1.1.1
  › @tauri-apps/api [NPM]: Not installed!
  › tauri [RUST]: 1.1.1,
  › tauri-build [RUST]: 1.1.1,
  › tao [RUST]: 0.14.0,
  › wry [RUST]: 0.21.1,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../public
  › devPath: http://localhost:8082/
  › framework: Svelte

App directory structure
  ├─ node_modules
  ├─ src
  ├─ .svelte-kit
  ├─ src-tauri
  └─ static

Stack trace

No response

Additional context

No response

@anterpin anterpin added status: needs triage This issue needs to triage, applied to new issues type: bug labels Nov 1, 2022
@yokljo
Copy link

yokljo commented Nov 3, 2024

@lucasfernog Hi, I believe this bug is back in Tauri 2, as I get exactly the same page as in the above screenshot when I click a mailto: link (in version 2.0.6 of Tauri).

@FabianLars
Copy link
Member

@yokljo do you have the shell plugin installed?

@gottlike
Copy link

gottlike commented Nov 15, 2024

@FabianLars

I did add the shell plugin and have these permissions:

  "permissions": [
    "core:default",
    "shell:allow-open",
    "shell:default"
  ]

And my mailto links won't open (nothing happens on macOS).

@FabianLars
Copy link
Member

Any errors in the dev tools console? What about your tauri info output?

I'll try it out again once I'm back home but I don't see anything wrong in the plugin's code right now.

@FabianLars
Copy link
Member

Using OP's example <a href="mailto:user@mail.com"> test </a>:

  • Windows: works
  • macOS: requires target="_blank"

The reason for that is that on Windows the os/webview handles those links already but on macOS it relies on the shell plugin which only reacts to a elements with the _blank target.

For me the current behavior is good enough, but feel free to open an issue here https://github.com/tauri-apps/plugins-workspace if you disagree.

@gottlike
Copy link

Thanks, @FabianLars. With "_blank" it works as expected and this is good enough for me, too! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Linux status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

5 participants