Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

According to this page, Firefox's default shortcuts for Mac include Command + W to close a window, and Command + Shift + W to close a window.

This behavior is infuriatingly nonstandard, and defies Apple Human Interface Guidelines, which state the following (see "Closing Windows"):

Users can close windows by choosing Close from the File menu, pressing Command-W, or clicking the close button. Follow the guidelines in this section to ensure that your app closes windows as users expect.

If one starts Firefox 30.0 (the latest stable version) on OS X in safe mode (in which FF is not affected by any extensions), they will see the following in the File menu:

Firefox keyboard shortcuts

As a use case, imagine a window open with several tabs. Command + W will close each tab, as expected. However, it is expected by hitting Command + W on the last tab, the window will close. This is not the case. Repeatedly using Command + W will just cause the new tab page to keep refreshing.

Is there a way with Firefox for Mac to have Command + W have the expected behavior (i.e. close the window upon closing of the last tab)? I've tried adding the Command + W shortcut under Firefox in System Preferences, however, the issue is not resolved.

share|improve this question
Firefox behaves the exact way you want. Starting in safe mode does not undo changes to Firefox’ core options. Create a new profile for testing. – Daniel B Jun 16 '14 at 14:37
Since you've found the answer right after placing the bounty, I refunded it for you. This is usually not done, but in this case we'd make an exception. – slhck Jun 16 '14 at 16:58
up vote 1 down vote accepted

It turns out that somehow or another, the browser.tabs.closeWindowWithLastTab preference flag for Firefox had been set to false, which resulted in the errant behavior.

Navigating to about:config and resetting that property fixed the issue.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.