I’ve had this problem the last couple of months when I click a link in an app outside of Safari (NetNewsWire, Tweetie…), it would often open in a minimized Safari window instead of the Safari window I was currently browsing with. As I often do when I need to vent, I posted it to Twitter. A couple of minutes later, I got this reply from @wez:
@maxvoltar Because you used to ‘open ex links in tabs’ code into terminal – and the minimized window was the first window you opened?
Made perfect sense. Before Safari had the option to open external links in the same window (instead of a new one), there was a hack many of us applied:
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
For some reason, after Safari added the new feature, it would always open external links in the oldest window if you ever used this hack.
The solution? Simple, just paste this piece of code (by @seiz) in Terminal.app, disabling the hack:
defaults delete com.apple.Safari TargetedClicksCreateTabs
Now, what’s the hack that allows me to use tab-groups in Safari?
- Hmm, looks like this didn’t solve it entirely, will continue investigating. If you know what’s causing this, please let me know!