How to Keep Safari Open Even After Closing the Last Tab

Ads by Google

When you’re down to the last tab on Safari and you hit Command+W to close that tab, Safari closes the window itself. This is one of Safari’s most annoying quirks. Thankfully, it does have a workaround that involves creating a simple keyboard shortcut.

When you have multiple tabs open in Safari, if you go to the File menu, you’ll see that the Command+W shortcut is assigned to the Close Tab function. So far so good.

Now close all unpinned tabs except one and visit the File menu again. What do you see? The Command+W shortcut appears assigned to the Close Window function. No wonder Safari closes the window when you use that shortcut.

safari-close-tab-shortcut

To fix this behavior, first go to System Preferences > Keyboard > Shortcuts > App Shortcuts. Click on the + icon below the section on the right to create a new Safari shortcut.

In the dialog that pops up, choose Safari from the Application: dropdown, type Close Tab in the Menu Title: field, and hit Command+W when the cursor is in the Keyboard Shortcut: field. Save the shortcut by clicking on the Add button.

Ads by Google

This tweak forces Command+W to trigger the Close Tab function every time you use it. The drawback here is that if you do want to close the last tab, you’ll have to close the window, either by clicking on the window’s Close button or by hitting Command+Shift+W.

You might also want to try the AppleScript shared in this Reddit thread to make Safari open a blank new tab when you close the last tab in that window. It did not work for me though.

If there’s a different fix that worked for you, tell us about it!

Image Credit: Vintage typewriter by MyImages – Micha via Shutterstock

Join live MakeUseOf Groups on Grouvi App Join live Groups on Grouvi
Awesome Webs & Tips
Awesome Webs & Tips
1097 Members
Online Security Tips
Online Security Tips
364 Members
Tips for Privacy Obsessed
Tips for Privacy Obsessed
260 Members
Affiliate Disclamer

This article may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.
New comment

Please login to avoid entering captcha

Log In