Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(ios): clicking links (#5291)

Peter Chinman239a0af4e96a
diff --git a/apps/web/src/lib/core/util/url.ts b/apps/web/src/lib/core/util/url.ts
index 3142bec49a..32c0b7d00d 100644
--- a/apps/web/src/lib/core/util/url.ts
+++ b/apps/web/src/lib/core/util/url.ts
@@ -1,4 +1,5 @@
import shortuuid from 'short-uuid';
+import { isTauri } from './platform';
import { getWebOrigin } from './webOrigin';
const short = shortuuid(shortuuid.constants.flickrBase58, {
@@ -46,6 +47,14 @@ export function openExternalUrl(url: string) {
for (const interceptor of externalUrlInterceptors) {
if (interceptor(url)) return;
}
+
+ if (isTauri()) {
+ // A same-window navigation reaches the native navigation plugin, which
+ // cancels the webview navigation and opens the URL in the system browser.
+ window.open(url, '_self')?.focus();
+ return;
+ }
+
window.open(url, '_blank', 'noopener,noreferrer')?.focus();
}