fix: unexpected openExternal dialog on macOS Tahoe (#48502)

fix: unexpected openExternal dialog on macOS Tahoe
This commit is contained in:
Shelley Vohr
2025-10-10 12:48:44 +02:00
committed by GitHub
parent 37c7487600
commit 11f76118db
2 changed files with 11 additions and 0 deletions

View File

@@ -148,6 +148,12 @@ void OpenExternal(const GURL& url,
return;
}
// Check this to prevent system dialog from popping up on macOS Tahoe.
if (![[NSWorkspace sharedWorkspace] URLForApplicationToOpenURL:ns_url]) {
std::move(callback).Run("No application found to open URL");
return;
}
NSWorkspaceOpenConfiguration* configuration =
[NSWorkspaceOpenConfiguration configuration];
configuration.activates = options.activate;