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
@@ -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