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:
1 parent
2dec6205c8
commit
9bfde632f9
4 files changed
+21
-5
No files matched your search
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ impl WebviewInstance {
|
||||
|| var.starts_with("https://")
|
||||
|| var.starts_with("mailto:")
|
||||
{
|
||||
_ = open::that_detached(&var);
|
||||
_ = webbrowser::open(&var);
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user