Pinterest Stumbleupon Whatsapp
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 How To Create A Keyboard Shortcut For Any Mac Menu Item How To Create A Keyboard Shortcut For Any Mac Menu Item Is there no keyboard shortcut for something you do regularly? That’s annoying, but here’s the good news: on your Mac you can add one easily, without the need for extra software. Read More .

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

Leave a Reply

Your email address will not be published. Required fields are marked *