fix link opening on mobile (#4415)

* fix link opening on mobile

* fix compil;e

* ughh just use webbrowser

* remove open
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-07-14 16:51:53 -07:00
1 parent 2dec6205c8
commit 9bfde632f9
4 files changed
+21 -5

No files matched your search

+1 -1
View File
@@ -47,11 +47,11 @@ async-trait = { workspace = true }
tao = { workspace = true, features = ["rwh_05"] }
dioxus-history = { workspace = true }
base64 = { workspace = true }
open = { workspace = true }
libc = "0.2.174"
pollster = "0.4.0"
rand = { workspace = true, features = ["std_rng"] }
subtle = { version = "2.6", features = ["const-generics"] }
webbrowser = { version = "1.0" }
[target.'cfg(unix)'.dependencies]
signal-hook = "0.3.18"
+2 -2
View File
@@ -268,8 +268,8 @@ impl App {
if let Some(temp) = msg.params().as_object() {
if temp.contains_key("href") {
if let Some(href) = temp.get("href").and_then(|v| v.as_str()) {
if let Err(e) = open::that_detached(href) {
tracing::error!("Open Browser error: {:?}", e);
if let Err(err) = webbrowser::open(href) {
tracing::error!("Failed to open URL: {}", err);
}
}
}
+1 -1
View File
@@ -321,7 +321,7 @@ impl WebviewInstance {
|| var.starts_with("https://")
|| var.starts_with("mailto:")
{
_ = open::that_detached(&var);
_ = webbrowser::open(&var);
}
false
}