MacOS – How do make a link open in a specific Safari window in macOS

macossafaritabs

I have multiple Safari windows for tab organization. I usually have multiple tabs in each window.

When I click on a link from an app other than Safari, it opens the link in a new tab in Safari, as Safari is my default browser.

The problem is that it often opens in a Safari window that is currently minimized or that I am currently not using. So it doesn't open the link in my main, active, current window (basically the one I have used last). Instead, it chooses its own "default window" to open links in, which may be a window I'm not even using.

However, I would like these links to always open in the window that I used last, and not in a window that I'm not using. Is it possible to make links always open in the last active window you used, or at least set the "default" window which will open new links?

I am currently running macOS Sierra 10.12.1, with the default Safari version that comes with it.

Best Answer

As a developer I researched the possibility of extensions being able to achieve what you want by always opening a new window when clicking a link contained outside of Safari itself. I'm sorry to say I don't think this approach is going to be possible.

Unfortunately, Safari does not give extensions a way to determine the origin of a new tab/window. What I mean by this is that a new tab can be created because the user clicks a link in an email, command-clicks a link in Safari, opens a Safari bookmark while holding down Command, clicks a link within a PDF document, or any one of several other actions that will open a page in a new tab. Regardless of the method, Safari does not provide how the window was opened to a Safari extension.

Since all these events look the same, no extension can force links from outside Safari to open in new windows without also affecting links opened in other ways (including while browsing within Safari).