johnste / finicky

A macOS app for customizing which browser to start
MIT License
3.74k stars 137 forks source link

Links with Safari as the default browser always open in the background #283

Open deviantintegral opened 2 years ago

deviantintegral commented 2 years ago

Describe the bug

When I click a link in an app, the link is opened but Safari is not brought to the front. This was an issue in macOS 12 and persists in macOS 13. What's odd is that the current app window loses focus, but the app remains active as shown by the menu bar.

This isn't an issue if I change defaultBrowser to FirefoxDeveloperEdition.

Your configuration

// Use https://finicky-kickstart.now.sh to generate basic configuration
// Learn more about configuration options: https://github.com/johnste/finicky/wiki/Configuration

// Generated by Finicky Kickstart
module.exports = {
  defaultBrowser: "Safari",
  handlers: [
    {
      match: /^https?:\/\/*.zoom\.(com)|(us)\/j\/.*$/,
      browser: "us.zoom.xos"
    },
    {
      match: /^https?:\/\/meet\.google\.com\/...-.*$/,
      browser: "com.google.chrome"
    }
  ]
}

To Reproduce Steps to reproduce the behavior:

  1. Set the installed configuration
  2. Open a link from another app while Safari is already open with at least one window. If it's quit, the spawning of the new window will bring it to the front.
  3. Notice Safari isn't activated.
JakeStevenson commented 1 year ago

I don't see this across the board, so I wonder if it's only certain types of applications.

For example, opening a link from within an email within Outlook or iMessage does bring an existing safari instance to the front, but opening a link from within Discord does not.

Even stranger -- if I have discord open on one side of the screen, and safari blocked by some other app on the other side of the screen, clicking a link in discord does bring safari in front of the other app. It's only if safari is hidden behind discord that clicking a link within discord keeps safari out of focus.

deviantintegral commented 1 year ago

I can replicate this with MailMate, a regular Cocoa macOS app. What's interesting is it worked the first time, but no further.