mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
fix: unexpected openExternal dialog on macOS Tahoe (#48502)
fix: unexpected openExternal dialog on macOS Tahoe
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user