Closing the last tab in a browser closes the whole app. In Firefox there’s config option “browser.tabs.closeWindowWithLastTab” to disable that and keep the window still open. You get used to it after using shortcuts on keyboard or mouse.
Unfortunately there’s no such option in Chrome (WontFix). To work around this, developers come up with solutions using various mechanisms:
- Keep at least always one extra tab (often pinned because it’s smaller)
- Always running process used for relaunching Chrome
- (Unreliable) spawning new tab after last one is closed
I tried most of the available extensions but none was perfect. The best were Keep One Pinned Tab and ReCreateWindow but both have serious bugs in my use scenario. While working on fixing the extension I realized I coded a brand new one. I ended up testing cases with multiple windows, dragging tabs and included options.
The name of this extension is simply Don’t Close Window With Last Tab (source on Github). I made the pinned tab to appear only when absolutely necessary. Firefox can only prevent closing of last tab in every window while Don’t Close Window With Last Tab lets users customize that. It also supports Chrome native options syncing.
Here’s list of similar extension and their downsides:
- Uses whole tab
- Doesn’t recreate tab after return from another window (to a window with single tab)
- Duplicates tab after launch (in same cases)
- Pinned tab is always displayed
- Always pinned tab prevents moving tabs across windows
- Requires always on Chrome process
- Reopened window has fixed position defined in settings – which can be different from the last actual position
- Doesn’t prevent from closing New Tab page (as a single last tab)
- Uses whole tab
- Doesn’t recreate tab after return from another window (to a window with single tab)
- Pinned tab is always displayed
- Bugs – infinite creating tab loop when closing pupup windows while having other windows with single tabs
- Doesn’t recreate tab after return from another window (to a window with single tab)
- Pinned tab is has focus (selected/activated) after startup
- (MacOS) window position is restored but not full screen state (if used)
- (MacOS) doesn’t work when tab is closed via the red tab Close (x) button
- Doesn’t always work
Bonus participant: Vivaldi
If you don’t need Google Chrome syncing, you can use Vivaldi which has such feature built-in (among other unique features as vertical tabs).